From bbc9bd48bf36a14bfdb0073b5a49536f294b6d4b Mon Sep 17 00:00:00 2001 From: davidwoody Date: Fri, 9 Jan 2015 20:16:41 -0500 Subject: [PATCH] revert --- components/ionTab/ionTab.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/components/ionTab/ionTab.js b/components/ionTab/ionTab.js index aa3e212..ffd6b3a 100644 --- a/components/ionTab/ionTab.js +++ b/components/ionTab/ionTab.js @@ -1,5 +1,9 @@ Template.ionTab.events({ 'click': function (event, template) { + if (template.data.path) { + Session.set('currentTab', template.data.path); + } + // If the tab's content is being rendered inside of a ionNavView // we don't want to slide it in when switching tabs IonNavigation.skipTransitions = true; @@ -18,14 +22,7 @@ Template.ionTab.helpers({ }, isActive: function () { - // reactive data source - var currentPath = Router.current().route.path(); - - if(this.href && this.href === currentPath){ - return 'active'; - } - - if (this.path && Router.routes[this.path].path(Template.parentData(1)) === currentPath) { + if (this.path && this.path === Session.get('currentTab')) { return 'active'; } },