@@ -52,30 +52,29 @@ export class NSRouterLink {
5252
5353 private commands : any [ ] = [ ] ;
5454
55- constructor ( private ngZone : NgZone , private router : Router , private navigator : RouterExtensions , private route : ActivatedRoute , private el : ElementRef ) {
56- }
57-
58- ngAfterViewInit ( ) {
59- this . el . nativeElement . on ( 'tap' , ( ) => {
60- this . ngZone . run ( ( ) => {
61- if ( NativeScriptDebug . isLogEnabled ( ) ) {
62- NativeScriptDebug . routerLog ( `nsRouterLink.tapped: ${ this . commands } ` + `clear: ${ this . clearHistory } ` + `transition: ${ JSON . stringify ( this . pageTransition ) } ` + `duration: ${ this . pageTransitionDuration } ` ) ;
63- }
64-
65- const extras = this . getExtras ( ) ;
66- // this.navigator.navigateByUrl(this.urlTree, extras);
67- this . navigator . navigate ( this . commands , {
68- ...extras ,
69- relativeTo : this . route ,
70- queryParams : this . queryParams ,
71- fragment : this . fragment ,
72- preserveQueryParams : attrBoolValue ( this . preserveQueryParams ) ,
73- queryParamsHandling : this . queryParamsHandling ,
74- preserveFragment : attrBoolValue ( this . preserveFragment ) ,
75- } ) ;
76- } ) ;
77- } ) ;
78- }
55+ constructor ( private ngZone : NgZone , private router : Router , private navigator : RouterExtensions , private route : ActivatedRoute , private el : ElementRef ) { }
56+
57+ ngAfterViewInit ( ) {
58+ this . el . nativeElement . on ( 'tap' , ( ) => {
59+ this . ngZone . run ( ( ) => {
60+ if ( NativeScriptDebug . isLogEnabled ( ) ) {
61+ NativeScriptDebug . routerLog ( `nsRouterLink.tapped: ${ this . commands } ` + `clear: ${ this . clearHistory } ` + `transition: ${ JSON . stringify ( this . pageTransition ) } ` + `duration: ${ this . pageTransitionDuration } ` ) ;
62+ }
63+
64+ const extras = this . getExtras ( ) ;
65+ // this.navigator.navigateByUrl(this.urlTree, extras);
66+ this . navigator . navigate ( this . commands , {
67+ ...extras ,
68+ relativeTo : this . route ,
69+ queryParams : this . queryParams ,
70+ fragment : this . fragment ,
71+ preserveQueryParams : attrBoolValue ( this . preserveQueryParams ) ,
72+ queryParamsHandling : this . queryParamsHandling ,
73+ preserveFragment : attrBoolValue ( this . preserveFragment ) ,
74+ } ) ;
75+ } ) ;
76+ } ) ;
77+ }
7978
8079 @Input ( 'nsRouterLink' )
8180 set params ( data : any [ ] | string ) {
0 commit comments