frictionlesspulley frictionlesspulley - 4 months ago 88x
AngularJS Question

force view to reload in ionic framework

I am new to mobile application development with ionic and wanted to know

I have a scenario where the login / logout buttons are located in the menu and a simple

On login and logout I need reload the page, inorder to refresh the data, however

takes the user back to the view without reload. the controller behind it is never invoked.

Is there a way to do clear history and reload the state in ionic ?


Welcome to the framework! Actually the routing in Ionic is powered by ui-router. You should probably check out this previous SO question to find a couple of different ways to accomplish this.

If you just want to reload the state you can use:

$state.go($state.current, {}, {reload: true});

If you actually want to reload the page (as in, you want to re-bootstrap everything) then you can use:


Good luck!