angular-cn/public/docs/_examples/pipes/ts/app/hero-birthday1.component.ts

13 lines
331 B
TypeScript
Raw Normal View History

// #docregion
import { Component } from '@angular/core'
@Component({
selector: 'hero-birthday',
// #docregion hero-birthday-template
template: `<p>The hero's birthday is {{ birthday | date }}</p>`
// #enddocregion hero-birthday-template
})
export class HeroBirthday {
birthday = new Date(1988,3,15); // April 15, 1988
}