Select Git revision
app-controllers.js
-
Benoit Lavenier authored
- On new message : fix click on item
Benoit Lavenier authored- On new message : fix click on item
app-controllers.js 10.54 KiB
angular.module('cesium.app.controllers', ['cesium.services'])
.config(function($httpProvider) {
'ngInject';
//Enable cross domain calls
$httpProvider.defaults.useXDomain = true;
//Remove the header used to identify ajax call that would prevent CORS from working
delete $httpProvider.defaults.headers.common['X-Requested-With'];
})
.config(function($stateProvider, $urlRouterProvider) {
'ngInject';
$stateProvider
.state('app', {
url: "/app",
abstract: true,
templateUrl: "templates/menu.html",
controller: 'AppCtrl',
data: {
large: false
}
})
.state('app.home', {
url: "/home",
views: {
'menuContent': {
templateUrl: "templates/home/home.html"
}
}
})
;
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/app/home');
})
.controller('AppCtrl', AppController)
.controller('PluginExtensionPointCtrl', PluginExtensionPointController)
.controller('EmptyModalCtrl', EmptyModalController)
.controller('AboutCtrl', AboutController)
;
/**
* Useful for modal with no controller (see Modal service)
*/
function EmptyModalController($scope, parameters) {
}
/**
* Useful controller that could be reuse in plugin, using $scope.extensionPoint for condition rendered in templates
*/
function PluginExtensionPointController($scope, PluginService) {
'ngInject';
$scope.extensionPoint = PluginService.extensions.points.current.get();
}
/**
* Abstract controller (inherited by other controllers)