feat(elements): enable Shadow DOM v1 and slots (#24861)
When using ViewEncapsulation.ShadowDom, Angular will not remove the child nodes of the DOM node a root Component is bootstrapped into. This enables developers building Angular Elements to use the `<slot>` element to do native content projection. PR Close #24861
This commit is contained in:

committed by
Misko Hevery

parent
4815b92495
commit
c9844a2f01
@ -266,6 +266,10 @@ export abstract class Renderer2 {
|
||||
* Implement this callback to prepare an element to be bootstrapped
|
||||
* as a root element, and return the element instance.
|
||||
* @param selectorOrNode The DOM element.
|
||||
* @param preserveContent Whether the contents of the root element
|
||||
* should be preserved, or cleared upon bootstrap (default behavior).
|
||||
* Use with `ViewEncapsulation.ShadowDom` to allow simple native
|
||||
* content projection via `<slot>` elements.
|
||||
* @returns The root element.
|
||||
*/
|
||||
abstract selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any;
|
||||
|
Reference in New Issue
Block a user