1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 02:36:36 +00:00

add list/show routes

This commit is contained in:
Rokt33r
2015-06-09 03:21:58 +09:00
parent 5ad5da47d2
commit f2daf5e9f4
12 changed files with 37 additions and 24 deletions

View File

@@ -7,14 +7,16 @@ angular.module('codexen')
var snippetId = $state.params.id
Snippet.show(snippetId)
Snippet.show(snippetId, {
'include': ['Tag']
})
.success(function (data) {
vm.snippet = data.snippet
vm.snippet = data
vm.isLoaded = true
})
vm.delete = function () {
Snippet.delete(vm.snippet._id)
Snippet.delete(vm.snippet.id)
.success(function () {
$rootScope.$broadcast('snippetDeleted')
})