mirror of
https://github.com/moparisthebest/mail
synced 2024-11-10 19:25:03 -05:00
36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
// hey Angular, we're bootstrapping manually!
|
|
window.name = 'NG_DEFER_BOOTSTRAP!';
|
|
|
|
require([
|
|
'angular',
|
|
'js/controller/message-list',
|
|
'js/controller/write',
|
|
'angularRoute',
|
|
'angularTouch',
|
|
'js/app-config'
|
|
], function(angular, MessageListCtrl, WriteCtrl) {
|
|
'use strict';
|
|
|
|
var app = angular.module('mail', ['ngRoute', 'ngTouch']);
|
|
app.config(function($routeProvider) {
|
|
$routeProvider.when('/folders/:folder', {
|
|
templateUrl: 'tpl/message-list-desktop.html',
|
|
controller: MessageListCtrl
|
|
});
|
|
$routeProvider.when('/folders/:folder/messages/:messageId', {
|
|
templateUrl: 'tpl/read.html',
|
|
controller: MessageListCtrl
|
|
});
|
|
$routeProvider.when('/write/:replyToId', {
|
|
templateUrl: 'tpl/write.html',
|
|
controller: WriteCtrl
|
|
});
|
|
$routeProvider.otherwise({
|
|
redirectTo: '/folders/Inbox'
|
|
});
|
|
});
|
|
|
|
angular.element().ready(function() {
|
|
angular.bootstrap(document, ['mail']);
|
|
});
|
|
}); |