freeCodeCamp/public/js/app.js

25 lines
771 B
JavaScript
Raw Normal View History

2013-11-13 21:05:26 +00:00
'use strict';
2013-11-13 17:32:22 +00:00
2013-11-13 21:05:26 +00:00
// Declare app level module which depends on filters, and services
angular.module('myApp', ['ngRoute', 'myApp.filters', 'myApp.services', 'myApp.directives']).
config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
$routeProvider.when('/view1', {
templateUrl: 'partials/partial1',
controller: MyCtrl1
});
$routeProvider.when('/view2', {
templateUrl: 'partials/partial2',
controller: MyCtrl2
});
$routeProvider.when('/login', {
templateUrl: 'partials/login',
controller: MyCtrl3
2013-11-14 18:29:13 +00:00
});
2013-11-15 16:13:21 +00:00
$routeProvider.when('/logout', {
controller: MyCtrl4
});
$routeProvider.otherwise({ redirectTo: '/view1' });
$locationProvider.html5Mode(true);
}]);