Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngMock - injector not attached to $rootElement #14022

Closed
@jsuchenia

Description

@jsuchenia

Under ngMock when injector was already created it's not connected to a $rootElement, so:
$rootElement.injector()`
returns an undefined value.

I wish to use $rootElement to create sub-elements for test purposes, then tested piece of code can use:
angular.element(localElement).injector()
to retrieve already initialised injector.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions