From f99d59c6e4f6b7c704166b8df7b2079e5059ee67 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 11 Jan 2016 13:25:10 +0300 Subject: [PATCH] refactor(mail): change navigation --- src/app/pages/mail/detail/MailDetailCtrl.js | 2 +- src/app/pages/mail/list/MailListCtrl.js | 1 + src/app/pages/mail/list/mailList.html | 2 +- src/app/pages/mail/mail.module.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) 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})">