For example,
There two JSON files:
Json file #1: [{colorname:blue},{colorname:blue}]
Json file #2: [{colorname:red},{colorname:red}]
In controller, there is a variable $scope.color
In html, there are two buttons, one is called "colorblue". the other one is called "colorred".
What I want to do is: When clicking button "colorblue", the $scope.color variable equals to Json file #1; When clicking button "colorred", the $scope.color variable equals to Json file #2.
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire