mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
BREAKING CHANGE: $ionicScrollDelegate no longer works globally; you must
create a new instance of each time you use it. The actual methods on
each instance of $ionicScrollDelegate are the same, however.
Change your code from this:
```js
function MyController($scope, $ionicScrollDelegate) {
$scope.scrollTop = function() {
$ionicScrollDelegate.scrollTop();
};
}
```
To this:
```js
function MyController($scope, $ionicScrollDelegate) {
var delegate = $ionicScrollDelegate($scope);
$scope.scrollTop = function() {
delegate.scrollTop();
};
}
```
4.2 KiB
4.2 KiB