W3cubDocs

/Angular 12

ng.getRootComponents

global function

Retrieves all root components associated with a DOM element, directive or component instance. Root components are those which have been bootstrapped by Angular.

ng.getRootComponents(elementOrDir: {} | Element): {}[]

Parameters
elementOrDir {} | Element

DOM element, component or directive instance for which to retrieve the root components.

Returns

{}[]: Root components associated with the target object.

© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/api/core/global/ngGetRootComponents