When I try to add a parameter to the constructor of a class I have an error: "Can't resolve all paremeters for Test c /: Users /....../ test.component.ts :(?).
import {Component} from "@angular/core";
@Component({
selector:"app-rueba",
template: "hola"
})
export class Prueba
{
n:string;
constructor(nombre:string)
{
this.n=nombre;
}
}
Why is this happening?? Excuse me if the answer is pretty obvious I'm pretty new to angular