1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 18:26:26 +00:00

rebuild app structure

This commit is contained in:
Rokt33r
2015-06-08 03:56:28 +09:00
parent 010ee6a711
commit 67d8183582
61 changed files with 705 additions and 1266 deletions

View File

@@ -0,0 +1,22 @@
/* global angular */
angular.module('codexen')
.controller('SnippetsDetailController', function (Snippet, $state, $rootScope) {
var vm = this
vm.isLoaded = false
var snippetId = $state.params.id
Snippet.show(snippetId)
.success(function (data) {
vm.snippet = data.snippet
vm.isLoaded = true
})
vm.delete = function () {
Snippet.delete(vm.snippet._id)
.success(function () {
$rootScope.$broadcast('snippetDeleted')
})
}
})