import { Component , OnInit } from "@angular/core" ; import { RouterExtensions } from "@nativescript/angular" ; import { ActivatedRoute } from "@angular/router" ; @ Component ( { moduleId : module . id , templateUrl : "./home-modal-view.component.html" } ) export class HomeModalViewComponent implements OnInit { constructor ( private _routerExtensions , private _activeRoute ) { } ngOnInit ( ) { this . _routerExtensions . navigate ( [ "modal" ] , { relativeTo : this . _activeRoute } ) ; } }