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:
@@ -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')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user