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 typing modules are the same as the target libraries but with the @types
prefix. To install them, just use the following command:
npm install @types/jquery @types/bootstrap --save-dev
The CSS file of the Bootstrap
library needs to be configured globally...