I'm new to Angular and I try to declare a new object type or a simple string variable but I get an error
this_is_variable:string;
recipe : Recipe;
the errors:
Property 'recipe' has no initializer and is not definitely assigned in the constructor.
Property 'this_is_variable' has no initializer and is not definitely assigned in the constructor.
In the above example Recipe is a class which I have import it
export class Recipe{
public name:string;
public description : string;
public imagePath: string;
constructor(name:string="none", desc:string="none" , imagePath:string="none"){
this.name= name;
this.description=desc;
this.imagePath= imagePath;
}
}