The ngClick allows you to specify custom behavior when element is clicked.

learn more… | top users | synonyms

0
votes
1answer
15 views

Bind ng-click function in compile with AngularJS

When we try to add an ng-click function (linked to a controller action) onto an element during the compile phase, it is not working. We can get it working if it is in the link function, but as we ...
0
votes
1answer
31 views

Adding parameter to ng-click function inside ng-repeat, seems not to work

I have simple loop with ng-repeat <li ng-repeat='task in tasks'> <p> {{task.name}} <button ng-click="removeTask({{task.id}})">remove</button> Also, there is a function ...
2
votes
1answer
54 views

ng-click doesn't fire from within template

In AngularJS, can methods be called from within templates without a directive or routeProvider to bind the scope? My specific problem is that my main controller (AppCtrl) is located on the body of my ...
0
votes
1answer
47 views

ng-click scope properties not updating as expected

I'm confused as to how angular updates properties on the scope. Here's a contrived version of my code. I expected $scope.name to be automatically updated when $scope.open changes. jsfiddle view ...
0
votes
1answer
97 views

Ng-click doesn't work inside ng-repeat

Ng-click doesn't work from inside ng-repeat. Outside it works. I've put a fiddle here <div ng-controller="MyCtrl"> <a ng-click="triggerTitle='This works!'">test</a> ...
0
votes
2answers
267 views

AngularJS - multiple ng-click - event bubbling

In the following example: <li ng-repeat="item in items" ng-click="showItem(item)"> <h3>{{item.title}}</h3> <button ng-click="remove(item)">Remove</button> ...
1
vote
2answers
81 views

Call dynamic function from ng-click

I have the following 2 functions/classes function Availability(){ this.Click = function (){ alert("Availability"); } } function Help(){ this.Click = function (){ ...