Toni Mora Toni Mora - 7 months ago 41
Javascript Question

What is the difference between "selectRootElement" and "createViewRoot" in AngularJS 2?

in the "Renderer" section, the official documentation does not specify... "Not Yet Documented" url


selectRootElement selects root element from DOM:

selectRootElement(selector: string): Element {...}

while createViewRoot creates ShadowDOM root at hostElement:

createViewRoot(hostElement: any): any {...}

You can see difference in the source code.