Reputation: 840
Hi I have annoying problem. I am trying to add two methods to $scope. And I am doing this right this:
function typeCtrl ($scope, $timeout) {
$scope.addType = function(){
requestHelper.addType();
};
$scope.removeType = function(number){
alert("asdasdsad");
requestHelper.removeType(number);
};
};
And I am trying to call it this way:
<button id="addType" class="btn btn-primary glyphicon glyphicon-plus" ng-click="addType()"></button>
<button id="removeRequest" class="btn btn-danger glyphicon glyphicon-minus" ng-click="removeType(1)"></button>
A method addType() works correctly but angular not see removeType() method. Can you tell me whay I am doing wrong. Thanks for replies.
Upvotes: 0
Views: 3617