Parallax
import { Directive, ElementRef,Renderer } from '@angular/core'; /** * Generated class for the ParallaxDirective directive. * * See https://angular.io/api/core/Directive for more info on Angular * Directives. */ @Directive({ selector: '[parallax-header]', // host:{ // '(ionScroll)':'onCntscroll($event)' // } // }) // export class ParallaxDirective { // constructor(public el: ElementRef, public re : Renderer) { // console.log('Hello ParallaxDirective Directive'); // } // header:any; // main_cnt:any; // ta:any; // ngOnInit(){ // let cnt= this.el.nativeElement.getElementsByClassName('scroll-content')[0]; // this.header=cnt.getElementsByClassName('bg')[0]; // this.main_cnt=cnt.getElementsByClassName('main-cnt')[0]; // ...