Skip to content

router-outlet used in Modal page navigation causing problem #1452

Closed
@liuwei108

Description

@liuwei108

Make sure to check the existing issues in this repository

If there is no issue for your problem, tell us about it

The doc introduced how to create Modal Dialog Navigation. I followed it to create:
modal page's main component and two inner modal page. It works.
However, If i change the
<page-router-outlet></page-router-outlet>
in modal page's main component to

<StackLayout>
    <router-outlet></router-outlet>
</StackLayout>

werid issue appears then:

In android, if I open the modal second time, an error occur and I click navigate to second inner modal page:

ERROR Error: Uncaught (in promise): Error: Cannot activate an already activated outlet
JS: Error: Cannot activate an already activated outlet
JS:     at RouterOutlet.activateWith 

In iOS, not such error occur, but if I open modal second time, the 2 inner modal page content shows in 1 page.

Which platform(s) does your issue occur on?

  • iOS/Android/Both

Please, tell us how to recreate the issue in as much detail as possible.

I created a demo in playground
Note the modal.component.html content is:

<StackLayout>
	<router-outlet></router-outlet>
</StackLayout>

That is the one to cause the problem. in a non-modal situation, changing root <page-router-outlet></page-router-outlet> to

<StackLayout>
    <router-outlet></router-outlet>
</StackLayout>

doesn't cause such problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions