Newer
Older
import {Directive, ElementRef, HostListener, Input} from '@angular/core';
@Directive({
selector: '[tabs-slides]' // Attribute selector
})
export class TabsSlidesDirective {
@Input('tabs-slides') index:Number;
screenWidth = window.screen.width;
constructor(public el:ElementRef) {
console.log(this.el)
console.log(this.index)
}
@HostListener('click')
click(){
console.log('directive:'+this.index)
}
}