Skip to content

Service provider in parent component, not provided to child component loaded with ngx-dynamic-hook. #27

@Charles22219

Description

@Charles22219

I provided a service in the parent component and that service is used on the child component.
This works fine, child component is able to 'see' service instance created in parent

<parent>
     <child></child>
</parent>

However loading the child with the dynamic hook as shown below, I get "NullInjectorError: No provider for xservice" error.

<parent>
     <ngx-dynamic-hooks [content]="'<child></child>'"></ngx-dynamic-hooks>
</parent>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions