Skip to content

OffCanvas is injected at the wrong level #4857

@goldmont

Description

@goldmont

Hi,

OffCanvas is unable to inject my services despide I pass the injector as argument.
However, using Modal it works just fine as expected.

This works:

const ref = this.modalService.open(MyComponent, {
	injector: this.injector
});

This doesn't:

const ref = this.offCanvasService.open(MyComponent, {
	injector: this.injector
});

The error I get:

ERROR ɵNotFound: NG0201: No provider found for _MyService.

Modal suffered from the same issue in the past (see #4447)

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