File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
nativescript-angular/router Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -76,21 +76,19 @@ export class NSRouterLink implements OnChanges { // tslint:disable-line:directiv
7676 JSON . stringify ( this . pageTransition ) ) ;
7777
7878 const extras = this . getExtras ( ) ;
79- this . navigator . navigate ( this . commands , extras ) ;
79+ this . navigator . navigateByUrl ( this . urlTree , extras ) ;
8080 }
8181
82- private getExtras ( ) {
82+ private getExtras ( ) : NavigationExtras & NavigationOptions {
8383 const transition = this . getTransition ( ) ;
84- const extras : NavigationExtras & NavigationOptions = {
84+ return {
8585 queryParams : this . queryParams ,
8686 fragment : this . fragment ,
8787 clearHistory : this . clearHistory ,
8888 animated : transition . animated ,
8989 transition : transition . transition ,
90+ relativeTo : this . currentRoute ,
9091 } ;
91-
92- return ( < any > Object ) . assign ( extras ,
93- this . currentRoute . toString ( ) !== "Route(url:'', path:'')" && this . currentRoute ) ;
9492 }
9593
9694 private getTransition ( ) : { animated : boolean , transition ?: NavigationTransition } {
You can’t perform that action at this time.
0 commit comments