refactor(mail): change navigation

pull/3/head
alex 2016-01-11 13:25:10 +03:00
parent 2e3a1c9d35
commit f99d59c6e4
4 changed files with 4 additions and 3 deletions

View File

@ -14,7 +14,7 @@
vm.mail = mailMessages.getMessageById($stateParams.id);
vm.back = function(){
$state.go('mail.label', {
label: 'inbox'
label: $stateParams.label
})
}
}

View File

@ -12,6 +12,7 @@
function MailListCtrl($stateParams, mailMessages) {
var vm = this;
vm.messages = mailMessages.getMessagesByLabel($stateParams.label);
vm.label = $stateParams.label;
}
})();

View File

@ -23,7 +23,7 @@
<table>
<tr ng-repeat="m in listCtrl.messages track by m.id | orderBy:'-date'"
class="side-message-navigation-item little-human shineHover {{m.tag}}"
ui-sref="mail.detail({id: m.id})">
ui-sref="mail.detail({id: m.id, label: listCtrl.label})">
<td>
<div class="mail-checkbox">
<label class="checkbox-inline custom-checkbox nowrap margin-left">

View File

@ -23,7 +23,7 @@
controller: "MailListCtrl",
controllerAs: "listCtrl"
}).state('mail.detail', {
url: '/detail/:id',
url: '/:label/:id',
templateUrl: 'app/pages/mail/detail/mailDetail.html',
controller: "MailDetailCtrl",
controllerAs: "detailCtrl"