Skip to content

AngularJs resolve fails even though it should not #76

@N3mezis

Description

@N3mezis

At least in AngularJs, the following condition may be true even though the $injector found the injectible - leading to an exception where there shouldn't be one.

let fromInjector = this.injector().getNative(token);
if (!fromInjector) {
throw new Error("Could not find Dependency Injection token: " + stringify(token));
}

For example:
angular.module(x).constant('iCanBeInjectedAndShouldNotThrow', false)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions