Hi I want to select the current month as default in the below code in Ember 1.10, current month is a variable in the controller:
currentMonth: moment().format("M"),
allMonths: moment.months()
////// HBS ////////////
<select id="selectMonth">
{{#each month in allMonths}}
{{#if currentMonth === month}}
<option selected="selected" value='{{_view.contentIndex}}'>{{month}}</option>
{{else}}
<option value='{{_view.contentIndex}}'>{{month}}</option>
{{/if}}
{{/each}}
</select>
I am getting Error for this. what is the other way we can add a if condition in this scenario.