angular.js - How to listen to browser close event in angular js
为情所困
为情所困 2017-05-15 17:09:24
0
1
778

Using angular to develop web, I want to save the current data to localStorage when the user closes the browser. But there is no way to monitor the browser closing event in the controller. Please give me some ideas! ! Thank you so much!

为情所困
为情所困

reply all(1)
淡淡烟草味

angularjs should not have this method, you can try window.onbeforeunload.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template