Intégration du Bootstrap avec Angular

Intégration du Bootstrap avec Angular

Après la création d’un nouveau projet avec l’utilisation du Angular CLI

On installe Bootstrap avec la ligne du commande

npm install bootstrap --save

Après l’installation on modifie le fichier .angular-cli.json situé dans la racine du dossier de l’application.

On fait une recherche sur styles et on ajoute le chemin du fichier bootstrap.css

"styles": [
    "styles.css",
    "../node_modules/bootstrap/dist/css/bootstrap.css"
],

Ensuite on doit redémarrer le serveur par la commande

ng serve

Et voilà, vous pouvez travailler maintenant avec les outils de Bootstrap.