I wrote a simple component like :
import { Component} from '@angular/core';
import { CategoryMessage } from 'src/app/models';
@Component({
selector: 'app-nous',
templateUrl: './nous.component.html',
styleUrls: ['./nous.component.scss']
})
export class NousComponent {
category = CategoryMessage.Resident;
constructor() { }
}
where CateroyMessage is an enum:
export enum CategoryMessage {
Resident = 'RESIDENT',
Family = 'FAMILY',
Etablissement = 'ETS',
AllFamily = 'ALL_FAMILY'
}
and my html component:
<app-conversation [category]="category"></app-conversation>
and I have the below error shown by the IDE on ‘category’:
Identifier ‘category’ is not defined. The component declaration, template variable declarations, and element references do not contain such a member
What’s wrong? And how can I get ride of this error?
Thanks