eventman/angular_app/js/app.js

30 lines
720 B
JavaScript
Raw Normal View History

2015-03-15 18:00:08 +01:00
var eventManApp = angular.module('eventManApp', [
'ngRoute',
'eventManControllers'
]);
eventManApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/persons', {
templateUrl: 'persons-list.html',
controller: 'PersonsListCtrl'
}).
when('/persons/:personId', {
templateUrl: 'person-detail.html',
controller: 'PersonDetailCtrl'
}).
when('/events', {
templateUrl: 'events-list.html',
controller: 'EventsListCtrl'
}).
when('/events/:eventId', {
templateUrl: 'event-detail.html',
controller: 'EventDetailCtrl'
}).
otherwise({
redirectTo: '/events'
});
}]);