I have been working on implementing a popover in my Angular 12 project using Bootstrap version v5.0.1
. However, I am encountering a name error that I can't seem to resolve:
var exampleEl = document.getElementById(item.name + index);
var tooltip = new bootstrap.Popover(exampleEl, {
container: 'body',
animation: true
});
Typescript is throwing an error saying
"Can't find name bootstrap"
.
To address this, I've added bootrap.js to my angular.json file as follows:
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
]
As per the documentation, popper.js should be bundled with Bootstrap, and since I'm not using jQuery, I don't want to include it. Despite researching, I haven't come across a similar issue, so I believe I might be missing something obvious. Any suggestions to help me troubleshoot this problem?