Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Operator '>' cannot be applied to types 'boolean' and 'number'?

Tags:

angular

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 ?

like image 665
None Avatar asked Aug 31 '17 06:08

None


1 Answers

Put the second expression inside parenthesis:

<div *ngIf="visibleblock && !(selected?.item?.externalInfo?.length > 0)">
like image 122
Faisal Avatar answered Sep 17 '22 21:09

Faisal