Answer the question
In order to leave comments, you need to log in
How can you define a class that implements an interface via html?
Hello.
There is an interface
export interfaces IFilter
{
id : string
description : string
type: number
}
export class InputFilter impl IFilter
{
id : string
description : string
inputString: string
type: number
}
export class InputDate impl IFilter
{
id : string
description : string
inputDate: string
type: number
}
<div *ngFor="let filter of filters">
<div *ngIf="type == 1">
{{ filter.inputDate }}
</div>
</div>
Answer the question
In order to leave comments, you need to log in
because implements only exists in typescript, as an aid to good advice to the programmer, and disappears at compilation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question