DEFAULT_RECORDS = [{ id: 1, name: 'John Evans', number: '01928 356115' },{ id: 16, name: 'Murbinator', number: '053180 080000' }];
-
retrieveEntries: function (name) {
var foundRecords = {};
var _this = this;
Record.findAll().then(function () {
var params = {
where: {
name: {
'in': name
}
}
};
foundRecords = Record.filter(params);
debugger;
_this.retrieveSuccess(foundRecords);
}).catch(function (error) {
console.log(error);
});
},
If 'in': name
is "John", no matching record is retrieved.
If 'in': name
is "John Evans", one matching record is retrieved.
When examining issue 238 in Angular-Data, it seems to be the correct way of filtering but does not return the expected result for sub-string filters.
I am unable to determine why no records are returned for the sub-string filter when the code reaches the debugger
statement.
Version details: angular-data 1.5.3, angular 1.3.8