user3531149
user3531149

Reputation: 1539

How to route through child components in nx remotes in nx 20?

I'm trying to create a host(shell) application with a child remote with a very simple tab navigation feature that displays child components

I generated a host/shell app called ga-host using the nx command line I also generated corresponding remote called connectors.

When I serve the ga-host using

nx serve ga-host --devRemotes=connectors

everything works fine, I see the welcome page

welcome page of ga-host

I can also route to the welcome page of the connectors using /connectors, which means the setup is fine.

welcome page of connectors

I created a second route which displays "routeme component"

second route with routeme component

and this actually works, when I visit connectors/second I can see the second page when I serve the host again.

now I'm trying to create a simple tab feature

added child route

I added a child route called 'first', so from now the remote connectors/first should render the welcome page and the child route in the router-outlet

image of router outlet

but when I access connectors/first in the browser, it doesn't throw a 404 page, which is great but the router-outlet remains empty, I would like to know why this is.

empty router outlet

I'm also open to different ways to achieving this, thanks in advance.

Upvotes: 0

Views: 21

Answers (0)

Related Questions