When I define inside my component in angular the instance variable like that: import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html', //template: ``
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'Welcome';
nombre1 : number;
}
I have a red line below nombre1.
The error is :
Property 'nombre1' has no initializer and is not definitely assigned in the constructor.ts(256
Can someone please tell me where is my error.