Operator '>' cannot be applied to types &#

2020-07-05 18:47发布

问题:

Im using this block in my html template :

  <div *ngIf="visibleblock && !selected?.item?.externalInfo?.length > 0">

But im getting this error when i do:

ng build --prod --aot

Any suggestion how can i fix this ?

回答1:

Put the second expression inside parenthesis:

<div *ngIf="visibleblock && !(selected?.item?.externalInfo?.length > 0)">


标签: angular