I have a tag like this :
<a data-ng-click="showform(@item.CategoryId)">
I have a variable "catid" in razor...
@{int catid; }
I want save value in 'catid'
this my js code :
app.controller('Result', function ($scope) {
$scope.CatId = 0;
$scope.showform = function (id) {
$scope.CatId = id;
}
});
Following is a working example, you can refer to it.
Make request(s) using AngularJS $http service
My
GetCategoryNameByIdaction method for testing purposeTest Result