35
rated 0 times
[
42]
[
7]
/ answers: 1 / hits: 12169
/ 3 Years ago, tue, april 20, 2021, 12:00:00
I'm trying to create a TS User class with angular. I declared my attributes as shown in the code below, but I'm getting this error.
An argument for 'id' was not provided.
export class User {
private id: number;
private etabName: string;
constructor(id: number, etabName: string, ) {
this.id = id;
this.etabName = etabName;
}
get _id(): number {
return this. id;
}
set _id(value: number) {
this. id = value;
}
}
More From » angular