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 was archived by the owner on Apr 12, 2024. It is now read-only.
I'm trying to chase down a very elusive bug, and I'm not sure exactly where it's occurring. Heres the setup:
The application is a game client, which is separated into two stages, both written as separate angularjs applications. The first stage is the login screen, and is comprised of a handful of pages, managed using ui-router. When the player logs in, the first stage creates a new module with the session information, asynchronously loads the second stage js from the server, unloads itself by removing the DOM element, and bootstraps the second stage, which is the actual game client. This is done with the following code:
I put this in a setTimeout to get out of the $apply scope of the first stage. The $rootScope refers to the first stage. This second stage also uses ui-router. This mostly works, with one major exception: the state configuration from the first stage has somehow survived, and is being applied to the second stage. Specifically, $urlRouterProvider and $stateProvider configuration in stage 1 still affects stage 2.
I don't know if this is intended behaviour, a bug in angularjs, or a bug in ui-router, which is why I created an issue in both. I'm on angularjs version 1.3.0, and ui-router 0.2.11. Thanks
The text was updated successfully, but these errors were encountered:
I located the root cause of this problem. It turned out to be something a bit different than what I had initially guessed, so I created a new issue for it (#9897).
I'm trying to chase down a very elusive bug, and I'm not sure exactly where it's occurring. Heres the setup:
The application is a game client, which is separated into two stages, both written as separate angularjs applications. The first stage is the login screen, and is comprised of a handful of pages, managed using ui-router. When the player logs in, the first stage creates a new module with the session information, asynchronously loads the second stage js from the server, unloads itself by removing the DOM element, and bootstraps the second stage, which is the actual game client. This is done with the following code:
I put this in a setTimeout to get out of the $apply scope of the first stage. The $rootScope refers to the first stage. This second stage also uses ui-router. This mostly works, with one major exception: the state configuration from the first stage has somehow survived, and is being applied to the second stage. Specifically, $urlRouterProvider and $stateProvider configuration in stage 1 still affects stage 2.
I don't know if this is intended behaviour, a bug in angularjs, or a bug in ui-router, which is why I created an issue in both. I'm on angularjs version 1.3.0, and ui-router 0.2.11. Thanks
The text was updated successfully, but these errors were encountered: