mirror of
https://github.com/BoostIo/Boostnote
synced 2026-01-06 13:39:19 +00:00
update search behavior
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
/* global angular */
|
||||
angular.module('codexen')
|
||||
.controller('SnippetsListController', function ($auth, Snippet, $scope, $state) {
|
||||
.controller('SnippetsListController', function ($auth, Snippet, $scope, $state, $scope) {
|
||||
var vm = this
|
||||
|
||||
vm.isLoaded = false
|
||||
|
||||
vm.search = $state.params.search
|
||||
|
||||
vm.snippetId = parseInt($state.params.id)
|
||||
$scope.$on('$stateChangeStart', function (e, toState, toParams) {
|
||||
vm.snippetId = parseInt(toParams.id)
|
||||
})
|
||||
|
||||
var loadSnippets = function () {
|
||||
if ($auth.isAuthenticated) {
|
||||
Snippet.findMine({
|
||||
|
||||
Reference in New Issue
Block a user