我试图使用Typescript的extends继承一个angularjs控制器.但是一旦我扩展控制器angularjs就会抛出这个错误:
错误:参数'GenericLookupCtrl'不是函数,未定义
这是我的父类和子类的简化代码:
家长:
module Controllers.SolMan
{
export class ParentCtrl
{
constructor(
seUIConfigsCacheService: Services.CrossCutting.UIConfigsCacheService,
seHttpService: Services.CrossCutting.HttpService,
$scope: Interfaces.IParentScope,
genericServices: Services.CrossCutting.GenericService,
$compile)
{
console.log('parent');
}
}
}
Run Code Online (Sandbox Code Playgroud)
儿童:
module Controllers.SolMan {
export class ChildCtrl extends ParentCtrl {
constructor(
seUIQueryConfigsCacheService: Services.CrossCutting.UIConfigsCacheService,
seHttpService: Services.CrossCutting.HttpService,
$scope: Interfaces.IChildScope,
genericServices: Services.CrossCutting.GenericService,
$compile,
$injector) {
super(seUIConfigsCacheService, seHttpService, $scope, genericServices, $compile);
console.log('Child');
}
}
}
Run Code Online (Sandbox Code Playgroud)
以下是控制器的注册方式:
.controller('ParentCtrl', Controllers.ParentCtrl)
.controller('ChildCtrl', Controllers.ChildCtrl)
Run Code Online (Sandbox Code Playgroud)
我可以使用控制器的纯angularjs继承,但是从子调用父方法我必须扩展子节点,因为否则typescript会给出错误,它无法在父节点中找到该方法.
javascript inheritance angularjs typescript angularjs-controller
在Google电子表格中,我想查询其他工作表中的数据,但问题是工作表的名称是否存在于单元格中.那么在QUERY函数中有一种方法可以动态提到工作表名称.基本上我试图做这样的事情,但动态表名称:
=QUERY('2012'!A2:F;"select C, sum(F) where A='December' group by C order by sum(F) desc")
我尝试这样做,但我得到Parse Error:
=QUERY(INDIRECT("Overview!L5")!A2:F;"select C, sum(F) where A='December' group by C order by sum(F) desc")
Run Code Online (Sandbox Code Playgroud)
在哪个概述!L5是要查询的工作表名称的单元格.我也尝试在INDIRECT周围连接引号,但这也没有用.
我认为我正在尝试从查询中做出很明显的事情,即获取按其他单元格中的值分组的单元格中的值的总和.
我第一次使用.net的Httpclient并且很难找到它.我已设法调用服务器并接收来自它的响应,但仍坚持从响应中读取.这是我的代码:
if (Method == HttpVerb.POST)
response = client.PostAsync(domain, new StringContent(parameters)).Result;
else
response = client.GetAsync(domain).Result;
if (response != null)
{
var responseValue = string.Empty;
Task task = response.Content.ReadAsStreamAsync().ContinueWith(t =>
{
var stream = t.Result;
using (var reader = new StreamReader(stream))
{
responseValue = reader.ReadToEnd();
}
});
return responseValue;
}
Run Code Online (Sandbox Code Playgroud)
虽然服务正在返回数据,但responseValue中有{}.我该如何解决这个问题?
该项目位于.Net 4.
我是ruby的新手,在创建示例应用程序时发现了一个问题,每当我默认执行http://127.0.0.1:3000/people/index时,会执行show action并将index作为参数.这是服务器日志:
Started GET "/people/index" for
127.0.0.1 at 2010-12-23 18:43:01 +0500 Processing by PeopleController#show as
HTML Parameters: {"id"=>"index"}
Run Code Online (Sandbox Code Playgroud)
我在路径文件中有这个:
root :to => "people#index"
resources :people
match ':controller(/:action(/:id(.:format)))'
Run Code Online (Sandbox Code Playgroud)
这里发生了什么,我该如何解决这个问题?
.net ×1
angularjs ×1
c# ×1
google-api ×1
httpclient ×1
inheritance ×1
javascript ×1
routes ×1
typescript ×1