-
Notifications
You must be signed in to change notification settings - Fork 81
/
app.js
40 lines (34 loc) · 793 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*global angular */
/**
* The main TodoMVC app module
*
* @type {angular.Module}
*/
angular = require('angular');
require('angular-route');
require('../dist/templateCachePartials');
angular.module('todomvc', ['ngRoute','todoPartials'])
.config(function ($routeProvider) {
'use strict';
var routeConfig = {
controller: 'TodoCtrl',
templateUrl: '/partials/todomvc-index.html',
resolve: {
store: ['todoStorage', function (todoStorage) {
// Get the correct module (API or localStorage).
return todoStorage;
}]
}
};
$routeProvider
.when('/', routeConfig)
.when('/:status', routeConfig)
.otherwise({
redirectTo: '/'
});
});
require('todoCtrl');
require('todoStorage');
require('todoFocus');
require('todoEscape');
require('footer');