refactor(controllers): assign to parent scope if possible

This commit is contained in:
Andy Joslin
2014-03-21 09:50:09 -05:00
parent aa280910df
commit 38acea337a
4 changed files with 10 additions and 8 deletions

View File

@@ -43,7 +43,7 @@ function($scope, scrollViewOptions, $timeout, $window, $$scrollValueCache, $loca
.data('$$ionicScrollController', this);
$parse(scrollViewOptions.controllerBind || '$ionicScrollController')
.assign($scope.$parent, this);
.assign($scope.$parent || $scope, this);
if (!angular.isDefined(scrollViewOptions.bouncing)) {
ionic.Platform.ready(function() {