I used two different controllers (suppose myCtrl1 and myCtrl2), and I set the button to myCtrl1. When we click this button, the action goes to myCtrl2 through an ajax call. Now I add some data to the .service () object and redirect the page using $state.go('tabs.myCtrl1) . Now I can not get the added data in the object. But when the application loads the first time you run an empty object in .service ().
$state.go('tabs.myCtrl1)
Will anybody help me
This may not be the best method, but you can store data in $ rootscope.variableName, which would allow access to data all over the world, otherwise it will not be erased when switching between controllers
Source: https://habr.com/ru/post/982386/More articles:How to upgrade from UISearchDisplayController deprecated in iOS 8.0 to UISearchController - iosJquery simulates a click on- javascriptRemoving HTML5 notification permissions - javascriptConverting php - iconv from UTF-8 to Windows-1250 not working - phpLoss of image orientation when converting an image to CGImage - iosassert (false) vs RuntimeException? - javaRemoving a number from a Java RNG range? - javaCombine two streams (ordered) to get the final sorted stream - scalaConvert strange Python date format to readable date - pythonConvert JSON timestamp string to python date in pandas dataframe - jsonAll Articles