refactor(docs-infra): fix docs examples for Angular-specific tslint rules (#38143)
This commit updates the docs examples to be compatible with the following Angular-specific tslint rules: - `component-selector` - `directive-selector` - `no-conflicting-lifecycle` - `no-host-metadata-property` - `no-input-rename` - `no-output-native` - `no-output-rename` This is in preparation of updating the docs examples `tslint.json` to match the one generated for new Angular CLI apps in a future commit. PR Close #38143
This commit is contained in:

committed by
Alex Rickabaugh

parent
5303773daf
commit
bfd13c06e1
@ -1,16 +1,16 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, HostBinding } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'comp-with-host-binding',
|
||||
template: 'I am a component!',
|
||||
host: {
|
||||
'[class.special]': 'isSpecial',
|
||||
'[style.color]': 'color',
|
||||
'[style.width]': 'width'
|
||||
}
|
||||
})
|
||||
export class CompWithHostBindingComponent {
|
||||
@HostBinding('class.special')
|
||||
isSpecial = false;
|
||||
|
||||
@HostBinding('style.color')
|
||||
color = 'green';
|
||||
|
||||
@HostBinding('style.width')
|
||||
width = '200px';
|
||||
}
|
||||
|
Reference in New Issue
Block a user