Skip to content

Instantly share code, notes, and snippets.

@vsavkin
Created May 13, 2014 22:03
Show Gist options
  • Save vsavkin/293a8cf339c3334bf0fd to your computer and use it in GitHub Desktop.
Save vsavkin/293a8cf339c3334bf0fd to your computer and use it in GitHub Desktop.
Dynamically Adding Routes
Injector inj = ngDynamicApp().addModule(new MyApp()).run();
Router r = inj.get(Router);
r.root.addRoute(name: 'newRoute',path: '/new-route');
@asherritt
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment