diff --git a/dist/js/ionic-angular.js b/dist/js/ionic-angular.js index 26f693f04b..4c73183bb9 100644 --- a/dist/js/ionic-angular.js +++ b/dist/js/ionic-angular.js @@ -2626,7 +2626,7 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu function update(doAnimation) { var locals = $state.$current && $state.$current.locals[name], - template = (locals && locals.$template ? locals.$template.trim() : null); + template = (locals && locals.$template ? locals.$template : null); if (locals === viewLocals) return; // nothing to do here, go about your business @@ -2639,7 +2639,7 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu }; if (template) { - currentElement = angular.element(template); + currentElement = angular.element(template.trim()); var registerData = {}; if(currentElement[0].tagName !== 'TABS') { diff --git a/js/ext/angular/src/directive/ionicViewState.js b/js/ext/angular/src/directive/ionicViewState.js index 2b762a92c7..a4d4eeb33e 100644 --- a/js/ext/angular/src/directive/ionicViewState.js +++ b/js/ext/angular/src/directive/ionicViewState.js @@ -278,7 +278,7 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu function update(doAnimation) { var locals = $state.$current && $state.$current.locals[name], - template = (locals && locals.$template ? locals.$template.trim() : null); + template = (locals && locals.$template ? locals.$template : null); if (locals === viewLocals) return; // nothing to do here, go about your business @@ -291,7 +291,7 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu }; if (template) { - currentElement = angular.element(template); + currentElement = angular.element(template.trim()); var registerData = {}; if(currentElement[0].tagName !== 'TABS') {