当我尝试将参数添加到类的构造函数时,我有一个错误:“无法解析测试 c 的所有参数 /: 用户 /.../ 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;
}
}
为什么会发生这种情况??请原谅我,如果答案很明显,我对角度很陌生
函数式编程
相关分类