Hello guyz my ionic app is wroking very well in android 6 and above but while testing it in android 5.1 and lower
it gives out error:
TypeError: undefined is not a function
at Array.findBy (file:///android_asset/www/js/app.js:35:17)
at Object.$scope.vEvents.initApp (file:///android_asset/www/js/controllers/languagesCtrl.js:20:51)
at fn (eval at <anonymous> (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:27643:15), <anonymous>:4:249)
at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:65429:9
at Scope.$eval (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:30400:28)
at Scope.$apply (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:30500:25)
at HTMLAnchorElement.<anonymous> (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:65428:13)
at defaultHandlerWrapper (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:16792:11)
at HTMLAnchorElement.eventHandler (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:16780:9)
at triggerMouseEvent (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:2953:7)
I am defining array findby method which works well in android 6 and above
Array.prototype.findBy = function(key, value) {
function iter(item) {
if(item[key] === value) {
return true;
}
return false;
}
return this.find(iter);
};
It looks like ionic is unable to read the find() method