Dropdowns and Collapse Not Working with Angular #32345
-
Hey all, here is a little information and I could use all the help I can get. Versions
Filesvendors/_bootstrap.scss:
styles/main.scss:
angular.json:
ExplainationEverything was working just fine in Alpha1, then one day it stopped working. I am not sure what changed in my code TBH. I ended up upgrading to Alpha3 hoping that would fix something but it didn't. I have tried a single dropdown on the page copied directly from the Bootstrap docs and that doesn't work. I can get it to work using Javascript though. If you're watching the element in Chrome debugger, when you click on the dropdown I can see aria-expanded and class flash but everything stays false and classes aren't added. The first time you click the What I've TriedI have tried including the JS files in Thanks for any help or tips. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Please make a test repo with the minimun dependencies and code so that we can try. |
Beta Was this translation helpful? Give feedback.
-
I had an idea that the JS file was getting added multiple times thanks to Angular. This all started happening when I added the @types/bootstrap. For some reason the entire JS file is getting added to my |
Beta Was this translation helpful? Give feedback.
I had an idea that the JS file was getting added multiple times thanks to Angular. This all started happening when I added the @types/bootstrap. For some reason the entire JS file is getting added to my
vendors.js
file, but I was also including it in myangular.json
file. Once I removed it fromangular.json
it started working! I still have no idea where Angular is actually grabbing the JS files from though...