My HTML code is in this format, and I want to check the value to display a different form based on certain conditions. I have set up the condition in my HTML like this:
requestStatus = RequestStatus;
<ng-container
*ngIf="
(model.lastStatus.requestStatus == requestStatus.Done ||
model.lastStatus.requestStatus == requestStatus.Rejected)
else ChangeStatus
"
>
The model.lastStatus.requestStatus
value is of type number
. Also, here are the Request Types defined:
export enum RequestStatus {
New = 1,
Processing = 2,
Accepted = 3,
Rejected = 4,
Done = 5
}
Everything runs smoothly without any errors when I run the project. However, when I try to build it, an error message pops up:
ERROR in src/app/pages/pages/e-money-deposit/components/emoney-deposit-detail/emoney-deposit-detail-request/emoney-deposit-detail-request.component.html(10,16): This condition will always return 'true' since the types 'RequestStatus.Done' and 'RequestStatus.Rejected' have no overlap.
What could be causing this issue?