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 Component.

Example

@Component(
  selector: 'greet',
  template: 'Hello {{name}}!',
  directives: const [GreetUser, Bold]
)
class Greet {
  final String name;
 
  Greet() : name = 'World';
}

Constructors

View({String templateUrl, String template, List directives, List pipes, ViewEncapsulation encapsulation, List<String> styles, List<String> styleUrls })

const

Properties

directives → List

Specifies a list of directives that can be used within a template.

read-only
encapsulation ViewEncapsulation

Specify how the template and the styles should be encapsulated.

read-only
hashCode → int

Get a hash code for this object.

read-only, inherited
pipes → List

read-only
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited
styles → List<String>

Specifies an inline stylesheet for an Angular component.

read-only
styleUrls → List<String>

Specifies stylesheet URLs for an Angular component.

read-only
template → String

Specifies an inline template for an Angular component.

read-only
templateUrl → String

Specifies a template URL for an Angular component.

read-only

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() → String

Returns a string representation of this object.

inherited