is missing the following properties from type 'CoreForm1'

17 views
Skip to first unread message

john.mb...@gmail.com

unread,
Mar 13, 2021, 5:37:35 AM3/13/21
to Angular and AngularJS discussion

I am just wondering why I am getting the following error:  
Type '{ key: string; type: string; templateOptions: { label: string; }; }[]' is missing the following properties from type 'CoreForm1': key, typets(2739)

here is the code for my CoreForm1:

export interface CoreForm1 {
key: string;
type: string;
templateOptions?: {
label?: string;
};
}

and here is my form:

[
{
"key": "Input",
"type": "input",
"templateOptions": {
"label": "Form 1"
}
}
]

Reply all
Reply to author
Forward
0 new messages