
This commit edits the copy of the attribute binding documentation, moves the colspan section that is primarily about property binding to the property binding document, and adds a docregion to the attribute-binding example to help clarify a point in the document. Part of the copy edit reformats the style precedence list in tabular format so that it is easier to read and understand. PR Close #38860
20 lines
403 B
TypeScript
20 lines
403 B
TypeScript
import { Component, HostBinding } from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'comp-with-host-binding',
|
|
template: 'I am a component!',
|
|
})
|
|
export class CompWithHostBindingComponent {
|
|
@HostBinding('class.special')
|
|
isSpecial = false;
|
|
|
|
@HostBinding('style.color')
|
|
color = 'green';
|
|
|
|
// #docregion hostbinding
|
|
@HostBinding('style.width')
|
|
width = '200px';
|
|
// #enddocregion hostbinding
|
|
|
|
}
|