freeCodeCamp/public/js/app.js

17 lines
513 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',
'myApp.controllers'
]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/view1', {templateUrl: 'partials/partial1.html', controller: 'MyCtrl1'});
$routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: 'MyCtrl2'});
$routeProvider.otherwise({redirectTo: '/view1'});
}]);