Fixed default route navRouter back button issue

This commit is contained in:
Max Lynch
2013-11-27 10:59:05 -06:00
parent 9b42ae65f1
commit 636fc8d5d5
2 changed files with 2 additions and 2 deletions

View File

@@ -1476,7 +1476,7 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture'])
// going forwards or back
$scope.$watch(function () { return $location.path() }, function (newLocation, oldLocation) {
if($rootScope.actualLocation === newLocation) {
if(oldLocation == '' || newLocation == '/') {
if(oldLocation == '') {// || newLocation == '/') {
// initial route, skip this
return;
}

View File

@@ -101,7 +101,7 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture'])
// going forwards or back
$scope.$watch(function () { return $location.path() }, function (newLocation, oldLocation) {
if($rootScope.actualLocation === newLocation) {
if(oldLocation == '' || newLocation == '/') {
if(oldLocation == '') {// || newLocation == '/') {
// initial route, skip this
return;
}