Skip to content

Instantly share code, notes, and snippets.

@nevercast
Created January 25, 2016 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nevercast/95571a943e6c5cd877aa to your computer and use it in GitHub Desktop.
Save nevercast/95571a943e6c5cd877aa to your computer and use it in GitHub Desktop.
Creating routes from aurelia features
import {AppRouter, RouterConfiguration} from "aurelia-router";
export function configure(config) {
const router = config.container.get(AppRouter);
const routerConfig = config.container.get(RouterConfiguration);
routerConfig
.map([{ route: "foo", moduleId: "features/foo/foo", name: "foo", nav: true, title: "foo" }])
.exportToRouter(router);
}
@nevercast
Copy link
Author

stoffeastrom dropped this on Aurelia/Discuss in Gitter. Felt I best save it for reference in future.

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