diff --git a/src/app/pages/mail/detail/MailDetailCtrl.js b/src/app/pages/mail/detail/MailDetailCtrl.js index 906e7bc..24fb944 100644 --- a/src/app/pages/mail/detail/MailDetailCtrl.js +++ b/src/app/pages/mail/detail/MailDetailCtrl.js @@ -14,7 +14,7 @@ vm.mail = mailMessages.getMessageById($stateParams.id); vm.back = function(){ $state.go('mail.label', { - label: 'inbox' + label: $stateParams.label }) } } diff --git a/src/app/pages/mail/list/MailListCtrl.js b/src/app/pages/mail/list/MailListCtrl.js index 4ee4333..58c2f77 100644 --- a/src/app/pages/mail/list/MailListCtrl.js +++ b/src/app/pages/mail/list/MailListCtrl.js @@ -12,6 +12,7 @@ function MailListCtrl($stateParams, mailMessages) { var vm = this; vm.messages = mailMessages.getMessagesByLabel($stateParams.label); + vm.label = $stateParams.label; } })(); diff --git a/src/app/pages/mail/list/mailList.html b/src/app/pages/mail/list/mailList.html index 6af01ed..040b6a1 100644 --- a/src/app/pages/mail/list/mailList.html +++ b/src/app/pages/mail/list/mailList.html @@ -23,7 +23,7 @@ + ui-sref="mail.detail({id: m.id, label: listCtrl.label})">