this *ngIf
:
<div *ngIf="type === FilterType.DateRangeFilter">
...
</div>
results in the error
error TS2339: Property 'FilterType' does not exist on type 'FilterComponent
even though the enum type FilterType
is imported into the component:
import { FilterType } from '../filter-collection/filter-collection.component'
@Component({
selector: 'app-filter',
templateUrl: './filter.component.html',
styleUrls: ['./filter.component.css']
})
export class FilterComponent {
constructor(private type : FilterType) {
}
ngOnInit(): void {
}
}
from here:
export enum FilterType {
DateRangeFilter, SensorSelectFilter
}
Any ideas why this wouldn't work?