So, I've created 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() {
}
}
But when attempting to compile my app using ng serve, I encountered an 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 have scoured the internet for solutions to this puzzling error, but so far, nothing has helped me resolve it. Despite my best efforts, the constructor setup appears correct to me. However, as a newcomer to Angular/TypeScript, I may be overlooking a fundamental detail. Any assistance would be greatly appreciated. Thank you.