From 513abc573caf7dabdb5940928e5a09523e97322a Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 28 Nov 2013 21:11:48 -0600 Subject: [PATCH] update so first nav will transition --- dist/js/ionic-angular.js | 19 ++++++++++--------- .../angular/src/directive/ionicNavRouter.js | 19 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/dist/js/ionic-angular.js b/dist/js/ionic-angular.js index 09ace2477e..f1f298e2a0 100644 --- a/dist/js/ionic-angular.js +++ b/dist/js/ionic-angular.js @@ -1412,12 +1412,12 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture']) this.goBack = function() { $scope.direction = 'back'; - } + }; }], link: function($scope, $element, $attr) { if(!$element.length) return; - + $scope.animation = $attr.animation; $element[0].classList.add('noop-animation'); @@ -1452,6 +1452,7 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture']) if(isFirst || (next && next.$$route && next.$$route.originalPath === "")) { // Don't animate + isFirst = false; return; } @@ -1476,9 +1477,9 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture']) // Keep track of location changes and update a stack pointer that tracks whether we are // going forwards or back - $scope.$watch(function () { return $location.path() }, function (newLocation, oldLocation) { + $scope.$watch(function () { return $location.path(); }, function (newLocation, oldLocation) { if($rootScope.actualLocation === newLocation) { - if(oldLocation == '') {// || newLocation == '/') { + if(oldLocation === '') {// || newLocation == '/') { // initial route, skip this return; } @@ -1511,7 +1512,7 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture']) } }); } - } + }; }]) /** @@ -1559,7 +1560,7 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture']) backButtonType: '@', backButtonLabel: '@', backButtonIcon: '@', - alignTitle: '@', + alignTitle: '@' }, template: '