I'm trying make a web which provided user for exam.Everyone only have 15 minutes to answer the questions.When user run out of time,system's gonna submit the result to server.But if user close the browser,nothing's gonna happen. So,how to listening the close event of browser in Angular.
Part2
I wanna submit the result when user close the browser or refresh the web.Ketan Akbari's answer helped me.But there is another question.When I refresh the web,I found the system did't submit the result.Then I open the firebug to check network and compare the difference between refresh and manual.
The dark one is manual,and bright one is refresh.I guess the refresh event stop the operation of submit?