Inside my HTML file:
<rating ng-show = "onerate =='null'" readonly="isReadOnly" ng-model="newRate.rating" max="max" class="assertive" ng-click="addRating('{{singleRecipe[0].recipe_id}}')" >
</rating>
I want that whenever I click once it will never be clickable.
Inside my controller in my Javascript file:
$scope.rate = 1;
$scope.max = 5;
$scope.isReadonly = false;
$scope.newRate = {};
$scope.newRate.userID = $scope.userdata.user_id;
$scope.addRating = function(recipe_id){
$scope.newRate.recipeID = recipe_id;
RatingList.add($scope.newRate);
console.log($scope.newRate);
$scope.isReadonly = true;
}