I got this error
SyntaxError: Unexpected token '}'. Expected a ':' following the property name 'value'.
(anonymous function)
when doing this :
var datas1 = [];
angular.forEach(data.data, function(value, key) {
if(value.comfi_type_id == "1" || value.comfi_type_id == "3" || value.comfi_type_id == "4")
datas1.push({value})
})
$timeout(function() {
$scope.items = {'data':{'data1':datas1}};
}, 1000);
The code run fine on Chrome, but only Safari appeared to be error. Can anyone enlighten me, what is wrong?
Question Update
After I doing this
datas1.push({value:value})
It is now run fine in Safari browser. But now when I tried on ios device (this is ionic app) the code is not functioning. No data is push inside datas1
I thought when everything work on Safari, also work on ios device ?