Reorganizes the project with clean MVC structure
This commit is contained in:
17
webapp/js/controllers.js
Normal file
17
webapp/js/controllers.js
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
var controllers = angular.module('satbd.satellite.bar.controllers',[
|
||||
'ui.bootstrap',
|
||||
'ngAnimate'
|
||||
]);
|
||||
|
||||
controllers.controller('NavBarCtrl',function($scope,$location) {
|
||||
$scope.isCollapsed = true;
|
||||
$scope.isActive = function(loc) {
|
||||
return loc === $location.path();
|
||||
};
|
||||
|
||||
$scope.search = function(searchTerms) {
|
||||
$location.url('/search?q='+ encodeURIComponent(searchTerms));
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user