we have a custom built JavaScript file which is injected as a script file in index.html into Consumer application having bootstrap 5 version installed using npm in the package.json of an angular application.
we also have bootstrap popover control initialization in our custom JavaScript file.
we are facing issues when trying to use the bootstrap 5 version dependency injected in the angular application in our custom JavaScript file.
It is throwing a console error saying bootstrap is not defined.
I have also tried importing the bootstrap using this syntax import 'bootstrap';, even this is throwing error.
I have also tried referencing the manual files in angular.json using below code, even that didn't work.
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
]
Can anyone suggest me the right way of consuming the bootstrap referenced in the angular project to my custom developed JavaScript file?
Via Active questions tagged javascript - Stack Overflow https://ift.tt/noNS1P7
Comments
Post a Comment