mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-20 13:11:44 +00:00
snippet.detail added
This commit is contained in:
15
src/states/snippets/detail.js
Normal file
15
src/states/snippets/detail.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/* global angular */
|
||||
angular.module('codexen.states')
|
||||
.controller('SnippetsDetailController', function (Snippet, $state) {
|
||||
var vm = this
|
||||
|
||||
vm.isLoaded = false
|
||||
|
||||
var snippetId = $state.params.id
|
||||
|
||||
Snippet.show(snippetId)
|
||||
.success(function (data) {
|
||||
vm.snippet = data.snippet
|
||||
vm.isLoaded = true
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user