How To Access The Angular Filter Value In Node Js
I am trying to access the value in node js using req.body which is in ng-model, actually my ng-model is having a angular js filter,I need to get that filter value from the input fi
Solution 1:
This would be your DOM, you can't apply filters to ng-model.
<inputtype="disable" ng-disabled="true"class="form-control"
name="count" ng-model="table.fields">
And in your controller code, do something like this. Inject $filter
as dependency in your controller.
$scope.table = {};
$scope.table.fields = $filter('mySum')($scope.table.fields);
//watch for updated value... .$scope.$watch('table.fields', function() {
//watch for changes and do something...
});
Post a Comment for "How To Access The Angular Filter Value In Node Js"