I have used two different controllers (assume: myCtrl1 and myCtrl2) and I set a button on myCtrl1. When we hit this button the action goes to myCtrl2 via ajax call. Now I'm append some data on .service() object and redirect the page using $state.go('tabs.myCtrl1)
. Now I can not get the appended data in object. But when app loads the first time it reads empty object in .service().
Anyone help to me
It may not be the best method but you can store data in $rootscope.variableName which would allow the data to be accessed globally aka it wont get wiped when you switch between controllers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With