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

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

matlab - error with cyclic autocorrelation function -

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -