Filter method is throwing error while running on android device

Hi,

I am having issue with ionic v1 project. i am using this method to search
$rootScope.menu = $rootScope.menu.filter(snap => {
return (snap.name.toLowerCase().indexOf($scope.srch.toLowerCase()) > -1);
})

this is working fine in browser but when i am trying to run the android build its throwing error during the loading of the app.

" Uncaught SyntaxError: Unexpected token { "

Please help me with this issue. thanks.