-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(State): Switch Internal State Object to prototypally inherit fro…
…m the State Declaration In 0.x, we used prototypal inheritance, i.e. `internalImpl = inherit(stateDeclaration)`. In 1.0 alphas, we switched to `extend(new State(), stateDeclaration)` to enable us to use `instanceof State`. However, this convenience for ui-router code was inconvenient for end users so we're switching back to using the state declaration as the prototype of the internal state object. - This enables users to create classes for their states, providing (e.g.) standardized onEnter functions, such as: ```js var myState = new LoggingState('mystate', '/url'); ``` Closes angular-ui/ui-router#3293 Closes #34
- Loading branch information
1 parent
ef6c87b
commit 027c995
Showing
6 changed files
with
200 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.