I am new to angular-cli. I want to install the npm library mdbootstrap. I followed the instructions here: Angular CLI Instructions
Specifically, I did this:
- I installed mdbootstrap via
npm install bootstrap
. - I added all of the files in the
dist
directory to myangular-cli.json
.
angular-cli.json
additions:
"styles": [
"../node_modules/mdbootstrap/css/bootstrap.min.css",
"../node_modules/mdbootstrap/css/mdb.min.css",
"../node_modules/mdbootstrap/css/style.css"
],
"scripts": [
"/node_modules/mdbootstrap/dist/js/bootstrap.min.js",
"/node_modules/mdbootstrap/dist/js/jquery-3.1.1.min.js",
"/node_modules/mdbootstrap/dist/js/mdb.min.js",
"/node_modules/mdbootstrap/dist/js/tether.min.js",
],
My Question:
Do I have to also include all of these files, via script <link>
and <script>
tags, to the index.html
base file?
EDIT
Before doing it the correct way, I just installed my libraries the old way, injected straight into index.html.
After following the instructions above, I do see an extra insertion in the source code of the index.html. So, that is promising.
But when I remove all of my original and tags I manually put in the index.html file, everything breaks. I tried making a jquery selection in the Chrome debug console, and it failed. I tried searching the angular-cli bundled files for 3rd-party functions. It's like nothing got installed from the ng serve command.