Andriy-Yahello / shop

Angular Training Shop Project
0 stars 0 forks source link

product.ts #2

Open VZhyrytskiy opened 5 years ago

VZhyrytskiy commented 5 years ago

Желательно уменьшить количество кода, используя public для параметров конструктора

export class ProductModel implements ProductModelInterface{
    name: string;
    description: string;
    price: number;
    category: Category;

    constructor(name:string, description: string , price:number , category:Category){
        this.name = name;
        this.description = description;
        this.price = price;
        this.category = category;
    }
}
Andriy-Yahello commented 5 years ago

addressed in Task2