I am trying to fetch my all dropdown at page load using ANgularJs+TypeScript.I am done with implementing ng-options
and ng-init
method to load it but there might me some problem thats why i am not able to get my data from my API or to give call to my API.I have given my Code with this question.
Here is my typescript Controller:-
/// <reference path="../interface/interface.ts" />
/// <reference path="../../scripts/typings/jquery/jquery.d.ts" />
/// <reference path="../../scripts/typings/angularjs/angular.d.ts" />
module CustomerNew.controllers {
export class CreateCustomerCtrl {
static $inject = ['$scope', '$http', '$templateCache'];
debugger;
constructor(protected $scope: ICustomerScope,
protected $http: ng.IHttpService,
protected $templateCache: ng.ITemplateCacheService) {
$scope.create = this.create;
$scope.getFormData = this.getformData;
}
public getformData: (getFormData: any) => {
$http.get();
}
Giving Error AS
It's giving error of "Property or signature expected" & Unexpected token. "A constructor, method, accessor, or property was expected".