We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
NgElement can be injected into a @Component or @Decorator constructor. It contains a reference to the raw DOM element for the directive.
import {Component, TemplateConfig, NgElement} from 'core/core.js'; @Component({ selector: 'my-comp', template: new TemplateConfig({ inline: '<div>hello</div>' }) }) class MyComp { constructor(element: NgElement) { //Outputs 'hello' console.log(element.domElement.textContent); } }
There was an error while loading. Please reload this page.