From ea9b61ae26f4d24ba0d9c50a6d234955550c4e03 Mon Sep 17 00:00:00 2001 From: mescalito <ncr2345@gmail.com> Date: Thu, 1 Aug 2013 16:30:45 -0400 Subject: [PATCH 1/4] Update controllers.js $http.delete will cause an 'Expected identifier' error in IE8. Use $http({'method':'DELETE', 'url':''}); instead. --- public/js/controllers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/controllers.js b/public/js/controllers.js index 8863f06a..a85da786 100644 --- a/public/js/controllers.js +++ b/public/js/controllers.js @@ -48,7 +48,7 @@ function DeletePostCtrl($scope, $http, $location, $routeParams) { }); $scope.deletePost = function () { - $http.delete('/api/post/' + $routeParams.id). + $http({'method':'DELETE', 'url':'/api/post/'} + $routeParams.id). success(function(data) { $location.url('/'); }); From addaf36b426d3b16b27d48221ca7333f30cdaf4d Mon Sep 17 00:00:00 2001 From: mescalito <ncr2345@gmail.com> Date: Thu, 1 Aug 2013 16:34:08 -0400 Subject: [PATCH 2/4] Update index.jade Fix Internet Explorer navigation --- views/partials/index.jade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/partials/index.jade b/views/partials/index.jade index 4faa9303..ab685383 100644 --- a/views/partials/index.jade +++ b/views/partials/index.jade @@ -2,8 +2,8 @@ p There are {{posts.length}} posts div(ng-repeat='post in posts') h3 {{post.title}} div {{post.text}} - a(href='/readPost/{{post.id}}') More + a(href='#/readPost/{{post.id}}') More | - - a(href='/editPost/{{post.id}}') Edit + a(href='#/editPost/{{post.id}}') Edit | - - a(href='/deletePost/{{post.id}}') Delete \ No newline at end of file + a(href='#/deletePost/{{post.id}}') Delete From 70d5224f6f078d2759928028ee90b51f7015b8cb Mon Sep 17 00:00:00 2001 From: mescalito <ncr2345@gmail.com> Date: Thu, 1 Aug 2013 16:34:56 -0400 Subject: [PATCH 3/4] Update index.jade Fix Internet Explorer navigation --- views/index.jade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/index.jade b/views/index.jade index b2bf4ca3..84464272 100644 --- a/views/index.jade +++ b/views/index.jade @@ -5,9 +5,9 @@ block body h2 My Blog ul li - a(href='/') Home + a(href='#/') Home li - a(href='/addPost') Add a new post + a(href='#/addPost') Add a new post div(ng-view) From a4941f6bd4d367211331d1d0650d9e277eeac5ae Mon Sep 17 00:00:00 2001 From: mescalito <ncr2345@gmail.com> Date: Thu, 1 Aug 2013 17:09:09 -0400 Subject: [PATCH 4/4] Since IE8 is based upon HTML 4, it does not support DELETE requests. Since IE8 is based upon HTML 4, it does not support DELETE requests. I would suggest using POST requests instead. $http['delete']('/api/post/'+ $routeParams.id). --- public/js/controllers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/controllers.js b/public/js/controllers.js index a85da786..23455c6f 100644 --- a/public/js/controllers.js +++ b/public/js/controllers.js @@ -48,7 +48,7 @@ function DeletePostCtrl($scope, $http, $location, $routeParams) { }); $scope.deletePost = function () { - $http({'method':'DELETE', 'url':'/api/post/'} + $routeParams.id). + $http['delete']('/api/post/'+ $routeParams.id). success(function(data) { $location.url('/'); });