@@ -17,6 +17,7 @@ import {
1717 Router ,
1818 ROUTES ,
1919 provideRouter ,
20+ withComponentInputBinding as angularWithComponentInputBinding ,
2021} from '@angular/router' ;
2122import { LocationStrategy , PlatformLocation } from '@angular/common' ;
2223import { NSRouterLink } from './ns-router-link' ;
@@ -42,11 +43,13 @@ export { NSLocationStrategy } from './ns-location-strategy';
4243export { NSEmptyOutletComponent } from './ns-empty-outlet.component' ;
4344export type { ComponentInputBindingOptions } from './router-component-input-binder' ;
4445
46+ const COMPONENT_INPUT_BINDING_FEATURE_KIND = ( angularWithComponentInputBinding ( ) as any ) . ɵkind ;
47+
4548function inputBinderProviders ( options : ComponentInputBindingOptions = { } ) : Provider [ ] {
4649 return [ { provide : INPUT_BINDER , useFactory : ( ) => new RoutedComponentInputBinder ( options ) } ] ;
4750}
4851
49- export function withComponentInputBinding ( options : ComponentInputBindingOptions = { } ) : Provider [ ] {
52+ export function provideComponentInputBinding ( options : ComponentInputBindingOptions = { } ) : Provider [ ] {
5053 return inputBinderProviders ( options ) ;
5154}
5255
@@ -98,7 +101,7 @@ export function rootRoute(router: Router): ActivatedRoute {
98101}
99102
100103export function provideNativeScriptRouter ( routes : Routes , ...features : RouterFeatures [ ] ) {
101- const hasInputBinding = features . some ( ( f : any ) => f . ɵkind === 8 /* RouterFeatureKind.ComponentInputBindingFeature */ ) ;
104+ const hasInputBinding = features . some ( ( f : any ) => f . ɵkind === COMPONENT_INPUT_BINDING_FEATURE_KIND ) ;
102105 return makeEnvironmentProviders ( [
103106 provideRouter ( routes , ...features ) ,
104107 {
0 commit comments