Created
May 13, 2014 22:03
-
-
Save vsavkin/293a8cf339c3334bf0fd to your computer and use it in GitHub Desktop.
Dynamically Adding Routes
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
Injector inj = ngDynamicApp().addModule(new MyApp()).run(); | |
Router r = inj.get(Router); | |
r.root.addRoute(name: 'newRoute',path: '/new-route'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adarsh J pointed out that I needed to update Dart SDK and Angular. Now I'm using Angular 0.11.0 and I can't find ngDynamicApp. Does it still exist in the latest?
Your sample https://github.com/vsavkin/angulardart-sample-app is very helpful, though I notice it is still using "type" and "value" in the Module instead of "bind".
I'm new to Dart and Angular, so I am trying to sort between what I don't know and what has changed.