Issue with directly opening a modal dialog box


I am trying to display a dialog box directly as a ShowModal component as we used to do in NativeScript 3.x. With NativeScript 4.x, do we always need to define a wrapper component which has page-router-outlet? If we are not doing it, my code does give me issue. Please find code to reproduce the issue where navigation does not work fine.

Flow should have run as

Login -> Select Location -> StaffList

whereas it runs as

Login -> Select Location -> Login

More details available in code.


It’s not necessary to wrap with page-router-outlet until you need navigation inside modal or at least ActionBar. Let me take a look at the code.


Are you using v6.1.0, Did you come through this?


i am using 6.1.0 and facing lot of issues on upgrade…Not sure whether its because if NativeScript upgrade or Angular.


I had followed below steps to create custom dialog. After upgrading nativescript version, it no longer works.

After checking the code, i found that ChildActivationStart Event getting triggered causing my page to redirect](
On further debugging realized that it happens when i open a modal dialog to select some details on login and then redirect. Attached playground code shows exactly same behavior.


@manojdcoder were you able to check the code? Issue which i am mentioning coming for versions lesser than 6.1.0 as well (i tried with 6.0.9).


As mentioned in the linked issue, use "6.1.0-2018-07-03-01".