Angular 9 References/ Core
References

@Attribute

This is the documentation for Angular 9.
You can switch to the latest version Angular 10.

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>
Links & Tutorials

attributeName#

attributeName?: string