A T A T - 3 days ago 6
CSS Question

Angular 2 CSS malfunction with Bootstrap v4 admin template

Running AngularJS 2.2.3 with Twitter Bootstrap 4.0.0-alpha.5. Here's what I'm getting:
bad admin (thanks angular)

Versus what I want:

nice looking no angular

Full code (with rendered output): https://gist.github.com/anonymous/cbe4161acb3734c53c45c44db6db854b

EDIT: Full repo with the admin decomposed into different components: https://github.com/AlecTaylor/angular2-bootstrapv4-admin

Answer

You're missing:

<link href="dashboard.css" rel="stylesheet">

Also, you probably shouldn't use a CDN with Angular 2.

Add to package.json:

"bootstrap": "^4.0.0-alpha.5",

Install with npm and reference from node modules:

npm i 

reference:

You also probably want these as well:

npm i tether --save

<script src="node_modules/jquery/dist/jquery.min.js"></script>
    <script src="node_modules/tether/dist/js/tether.min.js"></script>
    <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
Comments