Last active
July 11, 2018 04:37
-
-
Save erycamel/3f6001209bd5e190e3b172db8cded2eb to your computer and use it in GitHub Desktop.
Angular 4 & Bootstrap 4 & FontAwesome & JQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Angular 4 & Bootstrap 4 & FontAwesome & JQuery | |
1. Install Bootstrap 4 | |
As of now, Bootstrap 4 is still in alpha stage. This new version requires a newer version of jQuery as well as another component called tether.io which is used for the Bootstrap 4 Tooltips. | |
To install Bootstrap 4 and its dependencies, open up a terminal in your project’s base folder (where package.json is located) and execute the following commands: | |
npm install [email protected] --save | |
npm install jquery@^3.2.1 --save | |
npm install tether@^1.4.0 --save | |
If you don’t see any error messages then you successfully installed all the required components. Now open your angular-cli.json file with your favorite text editor and add the highlighted entries: | |
{ | |
"apps": [ | |
{ | |
"root": "src", | |
"outDir": "dist", | |
"styles": [ | |
"../node_modules/bootstrap/dist/css/bootstrap.min.css", | |
... | |
], | |
"scripts": [ | |
"../node_modules/jquery/dist/jquery.min.js", | |
"../node_modules/tether/dist/js/tether.min.js", | |
"../node_modules/bootstrap/dist/js/bootstrap.min.js", | |
... | |
], | |
... | |
} | |
], | |
... | |
} | |
Install Font Awesome | |
Installing Font Awesome is easier as it does not have any dependencies to 3rd party libraries. | |
So to install it you only need to execute the following in your project’s base folder: | |
npm install font-awesome --save | |
After successfull installation it is time to integrate it to your angular-cli.json file as well: | |
{ | |
"apps": [ | |
{ | |
"root": "src", | |
"outDir": "dist", | |
"styles": [ | |
"../node_modules/font-awesome/css/font-awesome.min.css", | |
... | |
], | |
... | |
} | |
], | |
"addons": [ | |
"../node_modules/font-awesome/fonts/*.+(otf|eot|svg|ttf|woff|woff2)", | |
... | |
] | |
... | |
} | |
npm i -g npm-check-updates | |
npm-check-updates -u | |
npm install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ng set --global packageManager=yarn
yarn add bootstrap
yarn add font-awesome
yarn add jquery
yarn add tether