I'm trying to understand how to create a model that includes an array. I am trying to do something like this but I'm getting an error :
ERRROR
Argument of type 'elset' is not assignable to parameter of type 'elset[]'.
MODEL
export class elset{
constructor(
public name: string,
public title: string
){}
}
export class pageModel{
constructor(
public type: string,
public set: elset[]
){}
}
SERVICE
@Injectable()
export class customService {
constructor ( ){}
types = [
new pageModel('home',
new elset('something','somethingelse')
)
];
}