I'm working on a site with a bunch of form elements that are inserted dynamically from a hard-coded list myFormElements:ElementBase
. Each element has a string label, and now I need to make these labels clickable to open a new tab (to an external URL). Ideally I'd like to modify ElementBase
to make it clickable somehow, is there way to do this? If not what is the best workaround?
<ng-container
myDynamicField
[field]="myFormElements[0]"
[group]="myForm"
...
>
</ng-container>
export const myFormElements:ElementBase = [
{
id: "some id",
label: 'some label',
type: 'text',
dataType: 'String',
...
},
...
]
export interface ElementBase {
id: string,
label?: string,
type?: string,
dataType?: string,
...
}