You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
966 B

'use strict';
angular.module('app.navbar', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/navbar', {
templateUrl: 'views/navbar/navbar.html',
controller: 'NavbarCtrl'
});
}])
.controller('NavbarCtrl', function($scope, $http, $routeParams, $location) {
$scope.searchString = "";
$scope.locationHash = $location.path();
console.log($scope.locationHash);
$scope.goBack = function() {
console.log("goBack");
window.history.back();
};
$scope.search = function() {
console.log($scope.searchString);
window.location.href = "#!/search/" + $scope.searchString;
};
$scope.logout = function() {
localStorage.removeItem("cic_admin_token");
localStorage.removeItem("cic_admin_userdata");
window.location.reload();
};
});