I am Playing around with Type Script.I have convert my angular js controller to Type Script But i m facing problem in ng-repeater. (I have attached my controller code below:
There is one issue with your constructor and $inject - these must fit together
// wrong
static $inject = ['$scope', '$http', '$templateCache'];
constructor (
private $http,
private $templateCache
){}
// should be
static $inject = ['$scope', '$http', '$templateCache'];
constructor (
private $scope,
private $http,
private $templateCache
){}
What happened in fact - all params were moved in the meaning, that
$httpwas$scopein fact, etc...
Simply, $inject array MUST fit to constructor parameter list
BTW, that's why I had previously here: https://stackoverflow.com/a/30482388/1679310 suggested to use types in the declaration:
constructor(protected $scope: ICustomerScope,
protected $http: ng.IHttpService,
protected $templateCache: ng.ITemplateCacheService)
{ ... }