I have an array that is being populated on an action.
The problem that I am having is how to remove the items from the array?
.
I am still learning ember.
{{#each request in model}}
<li class="field hotel-filter-list">
<label class="details checkbox" {{action 'toggleHotelFilterSelection' on='mouseDown'}}>
{{input type="checkbox" checked=isChecked}}
<span></span>
<div class="info semi-bold">
{{request.name}}
</div>
</label>
</li>
{{/each}}
globalFilterIds: [],
actions: {
toggleHotelFilterSelection: function(allRequest) {
var requests = this.get('requests');
if(requests.indexOf(allRequest.get('id')) < 0){
this.get('globalFilterIds').push(allRequest.get('id'));
}else{
this.get('globalFilterIds').remove(allRequest.get('id'));
}
}
,