Reputation: 141
My app is running in almost all browsers but when I use ie8 Expected Identifier happened.
$scope.delete = function (index) {
$scope.recipelists.splice(index, 1);
localStorage.setItem('markedRecipes', JSON.stringify($scope.recipelists))
if ($scope.recipelists == 0) {
$modalInstance.dismiss('cancel');
}
}
this is where ie8's console direct me when the error shows.
I don't know what's wrong with this.
Thanks!
Upvotes: 3
Views: 2050
Reputation: 14027
As per my understanding IE8 give storage to only valid domains. Try placing your example in some Web-server it should resolve the issue.
I faced the same issue when I tested it as an individual file but when i placed it in a server(Tomcat in my case) it just worked fine.
Source:-https://stackoverflow.com/a/12776794/1632286
Upvotes: 1
Reputation: 816364
IE8 doesn't support reserved words as literal object properties. Use
$scope['delete']
instead.
Upvotes: 8