Skip to content

Using RouterModule.forChild() in Sub Application #15

@dsuwirya

Description

@dsuwirya

Hello,

I'd like to make the sub-application's route to become sub-route of one of the main-application's route, e.g.

But when I change the RouterModule.forRoot() into RouterModule.forChild() in client-a's app.module.ts file like this:

image

I'm always getting StaticInjectorError as follow when the main-application is trying to load the client-a's main.js:

image

which seems because client-a's AppModule constructor can't find the proper Injector parameter:

image

Can anybody help to let me know how can I successfully achieve this?

Thank You

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions