more_horiz
@angular/core/globalscode
getRootComponents
function
stable
Retrieves all root components associated with a DOM element, directive or component instance. Root components are those which have been bootstrapped by Angular.
On this page
API
function getRootComponents(elementOrDir: {} | Element): {}[];@paramelementOrDir
{} | ElementDOM element, component or directive instance for which to retrieve the root components.
@returns
{}[]Root components associated with the target object.
Jump to details