Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function DeletePostCtrl($scope, $http, $location, $routeParams) {
});

$scope.deletePost = function () {
$http.delete('/api/post/' + $routeParams.id).
$http['delete']('/api/post/'+ $routeParams.id).
success(function(data) {
$location.url('/');
});
Expand Down
4 changes: 2 additions & 2 deletions views/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions views/partials/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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
a(href='#/deletePost/{{post.id}}') Delete