Detect unsaved changes and alert user using angularjs

前端 未结 7 1623
执念已碎
执念已碎 2020-11-29 18:50

Below is the code so far

    


    

        
相关标签:
7条回答
  • Anders's answer works fine, However, for people who uses Angular ui-router, you should use '$stateChangeStart' instead of '$locationChangeStart'.

    0 讨论(0)
提交回复
热议问题