I have a $scope variable in my controller. Initially it will load a value.
My requirement is that I want to update $scope variable value when button click.
Please let me know how can i achieve this.I am newbie to Angular.
var userName='UserName';
tepTableModule.controller('tepTableCtrl',function($scope,Service,$filter) {
$scope.searchText=userName;
$scope.refreshData = function() {
//when refreshData function called i want to update $scope.searchText value to new value.
$scope.tableData.data = $filter('filter')(tepJobData, $scope.searchText, undefined);
};
}
$scope.searchText = newValue;not work?