Introduction to ngx Bootstrap
Posted By : Anjali Bansal | 31-Oct-2018
In this blog, I want to tell about
Introduction
If you are just using Bootstrap's CSS then proceed If you want to use JS components written in angular, then we can use ng bootstrap, and it provides easy ways to interact with components.
The NGX-Bootstrap includes all core (and not only) angular powered bootstrap components. So we do not need to include the original JS components, but we are using markup and CSS provided by bootstrap.
How to Install NGX-Bootstrap:-
There are two type
1. you can install ngx-bootstrap from npm
npm install
2.you can use CDN Link of bootstrap style and JS Functionalty.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
NGX-Bootstrap available for bootstrap 4 and 3 version and after that how we can add in our project.
Manually set up bootstrap version:-
Sometimes, your project may have some libraries that can interfere with the bootstrap framework, or you may have a customized version of the bootstrap. The result is that the process of determining the bootstrap version can fail, which can break the UI. In that case, we can still set the bootstrap version manually to the BootGraping component (i.e. AppComonent):
import { setTheme } from 'ngx-bootstrap/utils';
@Component({…})
export class AppComponent {
constructor() {
setTheme('bs3'); // or 'bs4'
…
}
}
Usage & Demo:-
Some example are ngx bootstrap like:
Here are list of component those are provided by ngx-bootstrap:-
1. alerts
2. buttons
3. carousel
4. collapse
5. datepicker
6. dropdowns
7. modals
8. pagination
9. popover
And many example are there we can use through ngx-bootstrap.
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Anjali Bansal
Anjali is a frontend Developer. She sincere towards her work.