właściwości klasy resetowania typercript do domyślnych
export class Product{
productId: number;
productName: string = "Apple";
productDescription: string;
sideProducts: Array;
reset() {
this.productId = 0; //default of number datatype is 0
this.productName = "Apple";
this.productDescription = null;
this.sideProducts = [];
}
}
gdfelt