javascript - Get AngularJS object property name in the markup -


let's have object:

$scope.golovkin = {     id:12,     like:0,     dislike:0,     url:"https://twitter.com/gggboxing" }; 

and in view have button:

<input type="button" value="like" ng-click="incrementlikes(golovkin)" /> 

how replace value of button property name of $scope.golovkin.like string?

<input type="button" ng-model="golovkin.like" ng-click="incrementlikes(golovkin)" /> 

Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -