im trying to convert my angular 1 directive code to angular 2. But it throws an error saying ElementRef.find() is not a function. is there any other way to achieve the same. to find element inside an element.
Angular 1
link: function ($scope, $elem, attrs) {
var elem = $elem[0] table = $elem,
thead = table.find('thead'),
tbody = table.find('tbody'),
}
Angular 2
constructor(el: ElementRef, renderer: Renderer) {
this.elem = el.nativeElement;
this.table = el,
this.thead = this.table.find('thead');
this.tbody = this.table.find('tbody');
this.tableWidth = this.table[0].getBoundingClientRect().width;
}