mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Turns on the `strict` compiler flag and resolves the compilation errors in the various AIO examples. PR Close #41999
29 lines
500 B
TypeScript
29 lines
500 B
TypeScript
import { Component } from '@angular/core';
|
|
|
|
|
|
interface Item {
|
|
name: string;
|
|
manufactureDate: Date;
|
|
color?: string | null;
|
|
price: number;
|
|
}
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
styleUrls: ['./app.component.css']
|
|
})
|
|
export class AppComponent {
|
|
title = 'Template Expression Operators';
|
|
|
|
item: Item = {
|
|
name : 'Telephone',
|
|
manufactureDate : new Date(1980, 1, 25),
|
|
color: 'orange',
|
|
price: 98,
|
|
};
|
|
|
|
nullItem: Item | null = null;
|
|
|
|
}
|
|
|