From 2dfe0cac0dcac59deb6f48f35098e9c9a4ca539f Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Sat, 7 Sep 2013 00:34:36 +0200 Subject: [PATCH] add default route --- src/js/app.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/js/app.js b/src/js/app.js index 5dffc0a..4750938 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -6,15 +6,17 @@ require(['angular', 'js/controller/message-list', 'angularRoute', 'angularTouch' var app = angular.module('mail', ['ngRoute', 'ngTouch']); app.config(function($routeProvider) { - $routeProvider - .when('/folders/:folder', { - templateUrl: 'tpl/message-list-desktop.html', - controller: MessageListCtrl - }) - .when('/folders/:folder/messages/:messageId', { - templateUrl: 'tpl/read.html', - controller: MessageListCtrl - }); + $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.otherwise({ + redirectTo: '/folders/Inbox' + }); }); angular.element().ready(function() {