angularjs - ng-click not calling to type Script function -
i trying implement angular js code type script ng click not working. it's controller code:-
module customersearch.controllers { export class customerctrl { static $inject = ['$scope', '$http', '$templatecache']; constructor(protected $scope: icustomerscope, protected $http: ng.ihttpservice, protected $templatecache: ng.itemplatecacheservice) { $scope.search = this.search; } public search = (search: any) => { debugger; var search = { accountid: search.accountid, checkactiveonly: search.checkactiveonly, checkparentsonly: search.checkparentsonly, listcustomertype: search.listcustomertype }; this.$scope.customer = []; this.$scope.ticket = []; this.$scope.services = []; var url = "someurl"; // '<%=resolveurl("api/search/putdosearch")%>' this.$http.put(url, search). success((data, status, headers, config) => { debugger; this.$scope.cust_file = data[0].customers; this.$scope.ticket_file = data[0].tickets; this.$scope.service_file = data[0].services; }). error((data, status) => { console.log("request failed"); }); } } angular.module("customersearch").controller("customersearch.controllers.quicksearchcontroller"); }
i trying call type script class using ng click , move api there might problem ng-click not processed.
in short search
not search think is. here few reasons:
the class constructor isn't executed: try putting console.log in there.
the term
search
pointing other js object. select element in ui when running in chrome , log out :console.log(angular.element($0).scope())
Comments
Post a Comment