Issue with directly opening a modal dialog box


#1

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.


#2

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.


#3

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


#4

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


#5

I had followed below steps to create custom dialog. After upgrading nativescript version, it no longer works.
https://docs.nativescript.org/angular/ui/dialogs#custom-dialog

After checking the code, i found that ChildActivationStart Event getting triggered causing my page to redirect](https://stackoverflow.com/questions/51978435/nativescript-childactivationstart-event-getting-triggered-causing-my-page-to-re)
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.


#6

@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).


#7

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