Created
July 5, 2012 05:50
-
-
Save zoghal/3051597 to your computer and use it in GitHub Desktop.
Ember Router reopen
This file contains hidden or 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
App = Ember.Application.create(); | |
App.RootState = Em.State.extend({ | |
index : Em.State.extend({ | |
route : '/' | |
}), | |
main: Em.State.extend({ | |
route : '/main', | |
index : Em.State.extend({ | |
route : '/' | |
}) | |
}) | |
}); | |
App.Router = Ember.Router.extend({ | |
location : 'hash', | |
enableLogging : true, | |
root : App.RootState | |
}); | |
// later... | |
App.RootState.reopen({ | |
module: Em.State.extend({ | |
route : '/module', | |
index : Em.State.extend({ | |
route : '/' | |
}) | |
}) | |
}); | |
App.initialize(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment