angular/aio/content/examples/component-styles/src/app/hero-team.component.ts
Kristiyan Kostadinov e86a1d3441 docs: make all examples compatible with strict mode (#41999)
Turns on the `strict` compiler flag and resolves the compilation errors in the various AIO examples.

PR Close #41999
2021-05-17 10:42:18 -07:00

20 lines
522 B
TypeScript

import { Component, Input } from '@angular/core';
import { Hero } from './hero';
// #docregion stylelink
@Component({
selector: 'app-hero-team',
template: `
<!-- We must use a relative URL so that the AOT compiler can find the stylesheet -->
<link rel="stylesheet" href="../assets/hero-team.component.css">
<h3>Team</h3>
<ul>
<li *ngFor="let member of hero.team">
{{member}}
</li>
</ul>`
})
// #enddocregion stylelink
export class HeroTeamComponent {
@Input() hero!: Hero;
}