Files
deck/js/controller/AppController.js
Julius Haertl c958f9b37c Moar work
2016-08-15 11:29:11 +02:00

19 lines
500 B
JavaScript

app.controller('AppController', function ($scope, $location, $http, $route, $log, $rootScope, $stateParams) {
$rootScope.sidebar = {
show: false
};
$scope.sidebar = $rootScope.sidebar;
$scope.search = function (value) {
if (value === '') {
$location.search('search', null);
} else {
$location.search('search', value);
}
$scope.searchText = value;
};
$rootScope.searchText = $location.search().search;
});