Skip to content

Commit 7873064

Browse files
committed
style(content): fix jshint errors
1 parent 47075e4 commit 7873064

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

js/angular/directive/content.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
5454
priority: 800,
5555
compile: function(element, attr) {
5656
var innerElement;
57+
var scrollCtrl;
5758

5859
element.addClass('scroll-content ionic-scroll');
5960

@@ -143,18 +144,11 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
143144
}
144145

145146
// init scroll controller with appropriate options
146-
var scrollCtrl = $controller('$ionicScroll', {
147+
scrollCtrl = $controller('$ionicScroll', {
147148
$scope: $scope,
148149
scrollViewOptions: scrollViewOptions
149150
});
150151

151-
function onScrollComplete() {
152-
$scope.$onScrollComplete({
153-
scrollTop: scrollCtrl.scrollView.__scrollTop,
154-
scrollLeft: scrollCtrl.scrollView.__scrollLeft
155-
});
156-
}
157-
158152
$scope.$on('$destroy', function() {
159153
if (scrollViewOptions) {
160154
scrollViewOptions.scrollingComplete = noop;
@@ -166,6 +160,13 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
166160
});
167161
}
168162

163+
function onScrollComplete() {
164+
$scope.$onScrollComplete({
165+
scrollTop: scrollCtrl.scrollView.__scrollTop,
166+
scrollLeft: scrollCtrl.scrollView.__scrollLeft
167+
});
168+
}
169+
169170
}
170171
}
171172
};

0 commit comments

Comments
 (0)