Launching a training project that requires Popper.Js in its features has been quite challenging. Despite following Bootstrap's documentation on how to implement Popper.Js, I have encountered difficulties.
As per Bootstrap's docs, I tried initiating Popper.Js by:
$(function () {
$('[data-toggle="tooltip"]').tooltip();
});
I attempted using it in the main component's ngOnInit
, but unfortunately, it did not work as expected. An error message was displayed: "Property 'tooltip' does not exist on type 'JQuery'". Although I imported jQuery and the Bootstrap bundle file, the issue persisted. I even experimented with using "popper.js" instead of bootstrap.bundle.js, but encountered the same error. Both Bootstrap.bundle.js (which includes bootstrap and popper.js in the correct order) and jQuery are imported in angular-cli.json.