通过使用ngIf与字符串进行比较来显示差异消息

时间:2017-12-15 05:47:16

标签: angular

我试图根据我在角度使用ngIf的字符串显示不同的消息,但它无法正常工作

{{time}}
<div *ngIf="time !='the time which you selected'">
<p>
  The item will be picked up by our Style Delivery Associate on
  <strong>{{message}}</strong> between
  <strong>{{time}}</strong>.Please Keep the item ready with the original tag intact.
   Thank you!
</p>
</div>
<div *ngIf="time =='the time which you selected'">
<p>
  The item will be picked up by our Style Delivery Associate on
  <strong>{{message}}</strong>.Please Keep the item ready with the original tag intact. 
  Thank you!
</p>
</div>

{{time}}

的输出

enter image description here

0 个答案:

没有答案