I am creating an application with angular + ionic that uses the classic three-button menu at the bottom with three ion tabs in it. When the user clicks the tab, this template opens through ui-router.
I have these states:
$stateProvider .state('other', { url: "/other", abstract: true, templateUrl: "templates/other/other.html" })
In the template, I am doing something like:
<ion-nav-view name="other" ng-init="doSomething()"></ion-nav-view>
I know that I can write the doSomething () function in my controller and just call it manually. However, this gives me the same problem. I cannot figure out how to call the doSomething () function more than once when someone opens this view.
Currently, the doSomething () function is called just fine, but only the first time the user opens the view / tab window. I would like to call a function (to update geolocation) when the user opens this view or tab.
What would be the right way to implement this?
Thanks for the help!
angularjs ionic-framework
Jorre Nov 21 '14 at 9:41 2014-11-21 09:41
source share