2025-11-02 14:35:35 +03:00

25 lines
758 B
JavaScript

/** @publicapi @module ng1 */ /** */
import { ng as angular } from './angular';
/** @hidden */
function $ViewScrollProvider() {
var useAnchorScroll = false;
this.useAnchorScroll = function () {
useAnchorScroll = true;
};
this.$get = [
'$anchorScroll',
'$timeout',
function ($anchorScroll, $timeout) {
if (useAnchorScroll) {
return $anchorScroll;
}
return function ($element) {
return $timeout(function () {
$element[0].scrollIntoView();
}, 0, false);
};
},
];
}
angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);
//# sourceMappingURL=viewScroll.js.map