I have a simple component:
export class PlaintextComponent implements OnInit {
schema: PlaintextTagSchema;
constructor(private _ngZone: NgZone, prompt: string, maxRows: number, maxChars: number) {
this.schema.prompt = prompt;
this.schema.maxRows = maxRows;
this.schema.maxChars = maxChars;
}
ngOnInit() {
}
}
When I try to compile my app using ng serve, I get the error:
component.ts:25:40 - error NG2003: No suitable injection token for parameter 'prompt' of class 'PlaintextComponent'.
Found string
25 constructor(private _ngZone: NgZone, prompt: string, maxRows: number, maxChars: number) {
I've looked all over on the internet for this cryptic error and haven't found anything resembling a fix. It looks like a correct constructor to me, but I'm new to angular/TS and it's highly possible i'm missing something incredibly basic. Thanks in advance for the help.