eventman/angular_app/js/app.js

31 lines
744 B
JavaScript
Raw Normal View History

2015-03-15 18:00:08 +01:00
var eventManApp = angular.module('eventManApp', [
'ngRoute',
2015-03-21 11:34:55 +01:00
'eventManServices',
2015-03-15 18:00:08 +01:00
'eventManControllers'
]);
eventManApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/persons', {
templateUrl: 'persons-list.html',
controller: 'PersonsListCtrl'
}).
2015-03-15 23:05:59 +01:00
when('/persons/:personID', {
2015-03-15 18:00:08 +01:00
templateUrl: 'person-detail.html',
2015-03-15 23:05:59 +01:00
controller: 'PersonDetailsCtrl'
2015-03-15 18:00:08 +01:00
}).
when('/events', {
templateUrl: 'events-list.html',
controller: 'EventsListCtrl'
}).
2015-03-15 23:05:59 +01:00
when('/events/:eventID', {
2015-03-15 18:00:08 +01:00
templateUrl: 'event-detail.html',
2015-03-15 23:05:59 +01:00
controller: 'EventDetailsCtrl'
2015-03-15 18:00:08 +01:00
}).
otherwise({
redirectTo: '/events'
});
}]);