I am totally new in Ember in framework, and in one task stuck up.
I have an array of dates like
["2014-03-15T12:30:00Z", "2014-03-14T12:30:00Z", "2014-03-13T12:30:00Z", "2014-03-05T02:30:00Z", "2014-03-04T12:30:00Z", "2014-03-04T12:30:00Z", "2014-03-03T12:30:00Z", "2014-02-13T12:30:00Z"]
and there is one more array of object of events
I want to create a template which will show events as per dates. I mean all the events on 15th of march should shown under 15th march, like
Today
Event 1
Event 2
15th March
Event 3
Event 4
Likewise
Here is a code i have used so far
<div class="posts">
{{#each time in allEventsTimes}}
{{time}}
<ul id="posts" class="nav">
{{#each event in activities}}
{{if checkDate(event.trackable.startTime time)}}
{{partial 'user/date_event'}}
{{/if}}
{{/each}}
</ul>
{{/each}}
</div>
Where there is a method name "checkDate" which compares "event.trackable.startTime" with "time"
I am able to get result result of "checkDate" method if i use it separately, but if i use it under "if condition" it gives me error that if condition can accept only one argument
Please suggest right direction