What\'s the best way to prevent errors in console from objects that are still undefined?
Let\'s say I have this
name : string; constructor(private data:
Just initialize your variable
name : string = "";
or you can do it inside of the constructor
this.name = "";