Sign in
Log inSign up

Angular ui-router change ui-view and url without reloading the controller

Mohammad Wali's photo
Mohammad Wali
·May 7, 2016

Hi guys, I am using angular ui-router and i have a case in which i have 2 views, 'A' and 'B' now if user updates something in 'A' view controller and navigates to 'B' view and after that when he came back to view 'A' he should have his changes as same. If you know about ui-router it reinitialize the controller each time the route is updated, i tried using the $state.transitionTo with this options -

  • $state.transitionTo("A", null, { reload: false, inherit: true, notify: true });

But this doesn't fulfil my requirement, what i am looking for is to Update the view and url without reloading controller in some cases.