import { Directive , ElementRef } from '@angular/core' ; import { SmoothScrollManager } from './smooth-scroll-manager' ; import { SmoothScrollElement , SmoothScrollToElementOptions , SmoothScrollToOptions } from './smooth-scroll.model' ; @ Directive ( { selector : '[smoothScroll], [smooth-scroll]' , exportAs : 'smoothScroll' } ) export class SmoothScroll { constructor ( private element , private smoothScroll ) { } scrollTo ( options ) { return this . smoothScroll . scrollTo ( this . element , options ) ; } scrollToElement ( target , options ) { return this . smoothScroll . scrollToElement ( this . element , target , options ) ; } }