using typescript interface to get compile time error checking Copy
@Injectable()
export class AppComponent {
title = 'Orders';
- orders = [{
orders: order[]= [{
orderId: 5,
customerId: "abc"
},
{
orderId: 6,
customerId: "xyz"
}];
click() {
this.title += "button was clicked";
}
}
export interface order {
orderId?: number;
customerId?: string;
}
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com