Importing dependencies

Since we are going to wrap a component from the bootstrap library, we first need to download and import the bootstrap library and its dependencies and import it in to our code. The first step will be to install bootstrap with npm. Open the Terminal, make sure that you are inside the project root, and type npm install bootstrap -S. This command will download the bootstrap files into the node_modules and write it on the package.json.

Since bootstrap is dependent on jQuery library, we need to install it as well. We will use npm for it as well. In the Terminal, type npm install jquery –S.

We also need to install corresponding typings for these two libraries to be able to compile the application. The names of the corresponding ...

Get Angular 2 Components now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.