I have a model as
class AnnouncementDocument {
  Id: String;
  IsDeleted: Boolean;
  Name: String;
  TemporaryName: String;
  Description: String;
  AnnouncementDocumentTypeId: Number;
}
in my template i am using
*ngIf="announcementDocumentTypeId==1
and i get the error
[Angular] Expected the operants to be of similar type or any
which is right, because 1 in template is treated as string not number
how can i solve the issue ?
To check the type too , you will have to use === , Just check
*ngIf="announcementDocumentTypeId===1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With