I am trying to change the property value of an object by ng-click:

Asked

Viewed 74 times

1

When you click the button, I want to change the value of the property addButton within the variable gens for true.

Could someone help me? Follow the example on Codepen.

1 answer

2

Due to the Angular date-Binding, modifying the value of a variable in the scope, this change will be automatically reflected in the view.

That is, to show the button, just scroll through the items inside $scope.products, by changing the value of addButton of each of them to true, and automatically the buttons will appear.

Follow a Codepen: http://codepen.io/anon/pen/YyqwoW

Browser other questions tagged

You are not signed in. Login or sign up in order to post.