Seven price
asked on
angularjs ng-click function not working
the click event
http://plnkr.co/edit/bptVc kBXQC72anP GzDmR?p=pr eview
<a href="#" ng-click="myNum(l.GroupID)">{{l.Desc}}</a>
I need it to change the value
$scope.mypage = 1; // Need to change here and submit.
$scope.myNum = function (num) {
$scope.mypage = num;
alert($scope.mypage);
$scope.todo.items.push({GroupID: num, done: false });
}
so if you was to change $scope.mypage = 1 to $scope.mypage = 2 you see the table change. http://plnkr.co/edit/bptVc
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oh that was great. ok. the rest of the form that is not showing up. Is there a way to hold the values when I click to another page. so if I put something in the text box click on link and then go back can I get it to keep the input value I entered.
Hi,
I am away frim a pc, but if i remember well your code, yes on both questions. I will have to answer tomorrow though.
Giannis
I am away frim a pc, but if i remember well your code, yes on both questions. I will have to answer tomorrow though.
Giannis
ASKER
Ok great. Thanks again.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks again.
ASKER
have a quick question and this is goes with why i use ng-show. how can i get all the values if I am filtering the form
I do not quite understand the question. You are filtering the view not the values.
ASKER
I know but how can I retrieve the values on one submit. or should I change everything to and she show where everything is hidden in the dom but I could still retrieve all the values
ASKER
Sorry I was driving. I want to retrieve all the values and submit them at once. I know I am filtering. i was wondering does angularjs hold the values in the ng-model and I can submit them at once.
ASKER
I open another comment so you can retrieve the points. Thanks again.
https://www.experts-exchange.com/questions/28627780/angularjs-retrieve-values.html
https://www.experts-exchange.com/questions/28627780/angularjs-retrieve-values.html
ASKER