You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
I have simple app and on one page i need create WebSocket connection when page is rendered. When i leave page i need close this connection. So i basically need simpliest lifecycle events to do this. So, i try:
when i load DonateCtrl, and leave them (for example, to #about page) i see in my console:
viewContentLoaded
destroy
Everything is good.
but if i go back to #donate url i get this:
viewContentLoaded
destroy
viewContentLoaded
Why viewContentLoaded called twice? And why destroy even call??
And there is another related issue: if i click on #donate url again and again angular.js will update content with my template again and again and trigger viewContentLoaded event, just like this controller+view loaded for the first time. Can i prevent this bahaviour and prevent content loading if i request same url?
The text was updated successfully, but these errors were encountered:
I have simple app and on one page i need create
WebSocket
connection when page is rendered. When i leave page i need close this connection. So i basically need simpliest lifecycle events to do this. So, i try:when i load
DonateCtrl
, and leave them (for example, to#about
page) i see in my console:Everything is good.
but if i go back to
#donate
url i get this:Why
viewContentLoaded
called twice? And whydestroy
even call??And there is another related issue: if i click on
#donate
url again and again angular.js will update content with my template again and again and triggerviewContentLoaded
event, just like this controller+view loaded for the first time. Can i prevent this bahaviour and prevent content loading if i request same url?The text was updated successfully, but these errors were encountered: