4
Answers

how can I use conditions in templates when i want to compare with some

Photo of Shivakumar

Shivakumar

4y
569
1
how can I use conditions in templates when i want to compare with some data? for example something like this {% if vendor == 'vendor' %}

Answers (4)

2
Photo of Rajanikant Hawaldar
32 38.8k 455.5k 4y
  1. {% if 'vendor' in vendor %}  
Accepted
3
Photo of Rijwan Ansari
4 66.3k 3m 4y
You are using Jquery Template then use in this sample. 
  1. {{if $data.str1=='abc' && c$data.str2=='def'}}    
  2.     //do something    
  3. {{/if}}    
 
1
Photo of Shivakumar
NA 103 8.5k 4y
Thank you all
1
Photo of Kiran Mohanty
482 2.8k 315.5k 4y
If you are trying this in angular then here is the code.
  1. <div *ngIf = "vendorProperty === 'vendor' ">  
  2. </div>