Here is the code snippet I am referring to:
import { DataTable } from 'primeng/primeng';
@Component({
moduleId: module.id,
templateUrl: 'search.component.html'
})
export class SearchComponent {
@ViewChild(DataTable)
private dataTable: DataTable;
ngAfterViewInit () {
if (this.dataTable) {
console.log("detected");
}
else {
console.log("not detected");
}
}
}
I am attempting to access my p-table
component.
Any insights on why the p-table
is not being detected?
It's clear that the p-table
directive is present in the template.