Prevent a stateChange with angular ui router without using $rootScope

后端 未结 3 589
独厮守ぢ
独厮守ぢ 2021-01-31 08:55

My user can leave a state but before I want to show a modal dialog \"Do you want to save?\"

ONLY if the user data is dirty that means changed.

What I do NOT wan

3条回答
  •  独厮守ぢ
    2021-01-31 09:19

    Though at the time of writing it is not a part of the stable release, the 1.0 release of the UI-router will use the return value of onEnter/onExit to prevent navigation.

    See GitHub issue 2219

提交回复
热议问题