سؤال

How can i get this:

<div>{{ if(location.path !== '/'){ param }}}</div>

How can i print my view data conditionally or anyway run conditions into {{ param }} ?

هل كانت مفيدة؟

المحلول

You have to write expressions to be evaluated inside {{}}.

<div>{{location.path !== '/'? param :""}}</div>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top