Pedro Romano Barbosa Pedro Romano Barbosa - 1 year ago 326
TypeScript Question

Import Bootstrap styles in Angular 2

How do I import bootstrap into my angular 2 project? I have the bootstrap package in the nod_modules directory.
I do this in a component file:

import { Component } from '@angular/core';
import 'bootstrap';

But the page gets stuck in the loading...

Answer Source

Put this lines in you main html to install:

<script src=""></script>

<link href="" rel="stylesheet">

If you want use it in your component:

import {Component} from 'angular2/core';
import {Alert} from 'ng2-bootstrap/ng2-bootstrap';

This is de complete documentation for ng2-bootstrap:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download