export View : ViewFactory
export View : ViewFactory
exported from angular2/core defined in angular2/src/core/metadata.ts (line 921)
Metadata properties available for configuring Views.
Each Angular component requires a single @Component and at least one @View annotation. The
@View annotation specifies the HTML template to use, and lists the directives that are active
within the template.
When a component is instantiated, the template is loaded into the component's shadow root, and the expressions and statements in the template are evaluated against the component.
For details on the @Component annotation, see ComponentMetadata.
Example
@Component({
selector: 'greet',
template: 'Hello {{name}}!',
directives: [GreetUser, Bold]
})
class Greet {
name: string;
constructor() {
this.name = 'World';
}
}