For my project, I am incorporating the third-party jQuery library called https://github.com/mkoryak/floatThead.
To work with Bootstrap and jQuery, I have installed them using NPM through the command line. Additionally, I have used NPM to install floatThead.
Within my component, I have imported these modules:
import * as $ from 'jquery';
import 'floatThead';
I have successfully selected the table element in this manner:
<table class="table table-responsive table-bordered table-hover" #tableElement>
@ViewChild('tableElement')
private tableElement: ElementRef;
Despite attempting to call floatThead() like so, I encounter an error and do not see any changes reflected on my site:
public ngAfterViewInit(): void {
$(this.tableElement.nativeElement).floatThead({top: 50});
}
If anyone can provide insight into why this might be happening, it would be greatly appreciated.