Chethu
Chethu

Reputation: 555

Jade conditional logic is not working

 table
 tr(ng-repeat="(key1,val1) in val")
   -var imageCheck="{{key1}}"
   if (imageCheck=='image') 
        td #{imageCheck}
        td {{val1}}

In above code, imageCheck value is printing if we don't use with if condition, but it's not printing if we used with if condition.

I have tried:

  if(#{imageCheck}='image')

Not working.

Upvotes: 0

Views: 653

Answers (1)

Shaishab Roy
Shaishab Roy

Reputation: 16805

just use it may solve your problem

table
      tr(ng-repeat='(key1, val1) in val')
        td(ng-if="key1 === 'image'") {{val1}}
        td(ng-if="key1 !== 'image'") no Image found //or default image

Upvotes: 2

Related Questions