I'm trying to change the property value of an object with ng-click:

1

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

Can anyone help me? Follow the example in Codepen .

    
asked by anonymous 17.09.2015 / 00:11

1 answer

2

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

That is, to display the button, simply scroll through the items contained within $scope.products by changing the addButton value of each of them to true, and the buttons will automatically appear.

Follow a CodePen: link

    
17.09.2015 / 01:58