I generated a new Aurelia project using aurelia-cli with the au new command.
This is the app.ts given to me:
export class App {
message = 'Hello World!';
}
I updated my app.ts with the app.ts from this tutorial like this:
export class App {
constructor() {
this.message = 'Hello World!';
this.firstName = "Animesh";
this.lastName = "Bulusu";
}
get fullName() {
return `${this.firstName} ${this.lastName}`;
}
}
I can see the expected output when I refresh the page, but I get these errors in the Errors console.
Property 'message' does not exist on type 'App'.
Property 'lastName' does not exist on type 'App'.
Property 'lastName' does not exist on type 'App'.
If I remove the constructor and place the variables directly inside the class, these errors go away. Why is that and how do I get rid of these errors?
private message : string