1 | import { Router, AppRouter, RouteLoader } from 'aurelia-router';
|
2 | import { TemplatingRouteLoader } from './route-loader';
|
3 | import { RouterView, RouterViewLocator } from './router-view';
|
4 | import { RouteHref } from './route-href';
|
5 | import { IFrameworkConfiguration } from './interfaces';
|
6 |
|
7 | export function configure(config: IFrameworkConfiguration) {
|
8 | config
|
9 | .singleton(RouteLoader, TemplatingRouteLoader)
|
10 | .singleton(Router, AppRouter)
|
11 | .globalResources(
|
12 | RouterView,
|
13 | RouteHref
|
14 | );
|
15 |
|
16 | config.container.registerAlias(Router, AppRouter);
|
17 | }
|
18 |
|
19 | export {
|
20 | TemplatingRouteLoader,
|
21 | RouterView,
|
22 | RouterViewLocator,
|
23 | RouteHref
|
24 | };
|