Working with the Angular framework and this is my current class structure:
export class Demo {
_name: string;
constructor(inputName: string) {
this.name = inputName;
}
public set name(inputName: string) {
this._name = `%${inputName}%`;
}
public get name(): string {
return this._name;
}
}
Encountering an error message:
Property '_name' has no initializer and is not definitely assigned in the constructor.
Seeking advice on how to resolve this issue?