mirror of
https://github.com/BoostIo/Boostnote
synced 2026-01-03 20:19:17 +00:00
tag as v0.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* global angular */
|
||||
angular.module('codexen')
|
||||
.controller('SnippetsListController', function ($auth, Snippet, $scope, $state, $scope, $filter, mySnippets) {
|
||||
.controller('SnippetsListController', function ($auth, Snippet, $scope, $state, $scope, $filter, mySnippets, User) {
|
||||
var vm = this
|
||||
|
||||
vm.isLoading = false
|
||||
@@ -12,6 +12,16 @@ angular.module('codexen')
|
||||
vm.searchSnippets = searchSnippets
|
||||
vm.searchSnippets()
|
||||
|
||||
vm.isAuthenticated = $auth.isAuthenticated()
|
||||
var reloadUser = function () {
|
||||
if (vm.isAuthenticated) {
|
||||
User.me().success(function (data) {
|
||||
vm.currentUser = data
|
||||
})
|
||||
}
|
||||
}
|
||||
reloadUser()
|
||||
|
||||
// TODO: add Navigation methods
|
||||
// vm.nextSnippet()
|
||||
// vm.priorSnippet()
|
||||
|
||||
Reference in New Issue
Block a user