aurelia-templating-router
Version:
An implementation of the RouteLoader interface for use with the router module. Also contains a custom element that allows the templating engine to display the current route.
25 lines (21 loc) • 666 B
text/typescript
import { Router, AppRouter, RouteLoader } from 'aurelia-router';
import { TemplatingRouteLoader } from './route-loader';
import { RouterView, RouterViewLocator } from './router-view';
import { RouteHref } from './route-href';
import { IFrameworkConfiguration } from './interfaces';
export function configure(config: IFrameworkConfiguration) {
config
.singleton(RouteLoader, TemplatingRouteLoader)
.singleton(Router, AppRouter)
.globalResources(
RouterView,
RouteHref
);
config.container.registerAlias(Router, AppRouter);
}
export {
TemplatingRouteLoader,
RouterView,
RouterViewLocator,
RouteHref
};