@Attribute

The @Attribute decorator returns the value of the specified attribute from the host.

Example

export class MyComponent {
  constructor(@Attribute('test') public test: string) { }
}

Will read value from declaration:

<my-component test="hello"></my-component>
Tutorials