mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
17 lines
414 B
TypeScript
17 lines
414 B
TypeScript
// #docregion
|
|
import { Component, Input } from '@angular/core';
|
|
|
|
import { Hero } from './hero';
|
|
|
|
@Component({
|
|
selector: 'app-hero-child',
|
|
template: `
|
|
<h3>{{hero.name}} says:</h3>
|
|
<p>I, {{hero.name}}, am at your service, {{masterName}}.</p>
|
|
`
|
|
})
|
|
export class HeroChildComponent {
|
|
@Input() hero: Hero;
|
|
@Input('master') masterName: string; // tslint:disable-line: no-input-rename
|
|
}
|
|
// #enddocregion
|