consumerportal
Version:
mydna Custimised for you
30 lines (24 loc) • 845 B
text/typescript
/// <reference path="../../includes.ts" />
declare function smoothScroll(element, options);
module scrollerSrvc {
export interface IScrollerService {
TopScroll(): any;
}
export class ScrollerService implements IScrollerService {
static $inject = ['smoothScroll'];
constructor(private smoothScroll) { }
TopScroll() {
var element = document.getElementById('scroller');
var options = {
duration: 500,
offset: 0,
callbackBefore: function(element) {
},
callbackAfter: function(element) {
}
}
this.smoothScroll(element, options);
}
}
angular.module('scrollerSrvc', []).service('scrollerSrvc', ScrollerService);
}