UNPKG

@bespunky/angular-zen

Version:

The Angular tools you always wished were there.

22 lines (21 loc) 1.28 kB
import { Provider } from '@angular/core'; import { provideRouter } from '@angular/router'; import type { NoHead } from '@bespunky/typescript-utils'; import type { NavigationXRoute } from './types/composable-routes.types'; /** * Wraps Angular's `provideRouter` function and adds providers for the navigation-x module. * * @export * @param {NavigationXRoute<any>[]} routes The Angular routes config tree to initialize navigation-x for. * @param {...NoHead<Parameters<typeof provideRouter>>} features Addtional features to pass into Angular's `provideRouter` function. * @return {Provider[]} The providers returned by `provideRouter`, along with other providers needed for navigation-x to work. */ export declare function provideRouterX(routes: NavigationXRoute<any>[], ...features: NoHead<Parameters<typeof provideRouter>>): Provider[]; /** * Wraps Angular's `provideRoutes` function and adds providers for the navigation-x module. * * @export * @param {...NavigationXRoute<any>[]} routes The Angular routes config tree to initialize navigation-x for. * @return {Provider[]} The providers returned by `provideRoutes`, along with other providers needed for navigation-x to work. */ export declare function provideRoutesX(...routes: NavigationXRoute<any>[]): Provider[];