@jamesbenrobb/app-shell-routing-adaptors
v0.0.15
Published
Application shell routing adaptors
Downloads
4
Readme
App Shell Routing Adaptors
What.
Routing adaptors for @jamesbenrobb/app-shell
How.
Standard Angular routes
Use getJBRAppShellAngularRouterProviders
.
- Converts the routes registered through
provideRouter(routes)
into aNavConfig
- Creates a route manager to enable/manage 2 way communication between the Angular Router and app shell navigation
import {ApplicationConfig} from "@angular/core";
import {provideRouter} from "@angular/router";
import {getJBRAppShellProviders} from "@jamesbenrobb/app-shell";
import {getJBRAppShellAngularRouterProviders} from "@jamesbenrobb/app-shell-routing-adaptors";
import {routes} from "app.routes";
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(routes),
getJBRAppShellProviders(),
getJBRAppShellAngularRouterProviders()
]
};
Dynamic routes
For use with @jamesbenrobb/dynamic-routes-ngx
import {ApplicationConfig} from "@angular/core";
import {provideRouter} from "@angular/router";
import {getJBRAppShellProviders} from "@jamesbenrobb/app-shell";
import {getJBRAppShellDynamicRoutesNgxProviders} from "@jamesbenrobb/app-shell-routing-adaptors";
export const appConfig: ApplicationConfig = {
providers: [
getJBRAppShellProviders(),
getJBRAppShellDynamicRoutesNgxProviders(),
getJBRDRAppProviders(
'assets/route-config.json', {
appName: 'Demo App'
}
)
]
};