mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-29 01:21:53 +00:00
update search behavior
This commit is contained in:
@@ -11,7 +11,7 @@ angular.module('codexen')
|
||||
callSign: vm.callSign,
|
||||
mode: vm.mode == null ? null : vm.mode.toLowerCase(),
|
||||
content: vm.content,
|
||||
tags: angular.isArray(vm.Tags) ? vm.Tags.map(function (tag) { return tag.name }) : []
|
||||
Tags: angular.isArray(vm.Tags) ? vm.Tags.map(function (tag) { return tag.name }) : []
|
||||
}
|
||||
|
||||
Snippet.create(params)
|
||||
|
||||
@@ -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