1
0
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:
Rokt33r
2015-06-19 22:07:10 +09:00
parent 4094fff859
commit 9e53bec631
10 changed files with 105 additions and 36 deletions

View File

@@ -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()