I am a newbie working on building a web app in Ionic. Here's the code I am stuck at: http://pastebin.com/index/HihYnSk5. Basically, I have a button which when clicked on should display "test" on the All Favors page. From what I can see, test is getting added to favors object in my .js file but it's not getting displayed on the screen. Can someone help out?
You should not add ng-controller="allFavorsCtrl"
in two different elements, they will not share the same scope
and so updating one will not reflect on the other.
Try to put both elements under a common <div ng-controller="allFavorsCtrl">
. If you cannot have them both under the same element, then you need to create a service
to share information across them.
Also, <span ng-model = "favor">
will not do anything: a <span>
cannot have a ng-model
.