mardi 14 juillet 2020

Add AND condition in Handlebars/HtmlBars template

In my Ember project, I have a button as below;


Currently I have the "enabled" property based on gridItems.length < maxRecordsInGrid I want to add a 2nd condition to this i.e. if a property called "enableBtn" is true

So, essentially, I want the "enabled" property to be an AND between;

  1. gridItems.length < maxRecordsInGrid
  2. enableBtn is true

Is it possible to do this directly in the template using some inbuilt HTMLBars condition without the need of explicit helpers?




Aucun commentaire:

Enregistrer un commentaire