Getting Started With "ng-bootstrap" In Angular 5 App

February 06, 2018 0 Comments

Getting Started With "ng-bootstrap" In Angular 5 App

 

 


  • In order to use Bootstrap frameworks in the Angular app, earlier we would have had to use bootstrap CSS as well as its JavaScript files, but “ng-bootstrap” gives us the best approach to use without any JS file in our Angular applications.

  • “ng-bootstrap” provides a module that can be load in our Angular apps which provides us native Angular components and widgets that we can use in the same way as we use other Angular provided components or our custom components.

  • Since “ng-bootstrap” itself a module that encapsulates all of the Bootstrap functionality so there is no need to use any other 3rd party library into our Angular app.

  • Only dependencies are – – It supports all of the browsers that has the same intersection of browsers supported by both Angular 4+ and Bootstrap 4.0.0 CSS only like, – – Now we will see “How to install ng-bootstrap module to be used in Angular apps?”

  • Open app.module.ts file under app folder of your Angular 5 application and import the NgbModule coming from Ng-bootstrap.


In this article, we are going to cover “how to install and setup ng-bootstrap in our Angular 5 apps.”

In this article, we are going to cover “how to install and setup ng-bootstrap in our Angular 5 apps.”

What is ng-bootstrap?

ng-bootstrap is an open-source repository that provides a couple of native Angular widgets which are built using Bootstrap 4 CSS. As you know Bootstrap is one of the most popular CSS frameworks which is used to build stylish and modern applications, which has HTML, CSS and JavaScript libraries. In order to use Bootstrap frameworks in the Angular app, earlier we would have had to use bootstrap CSS as well as its JavaScript files, but “ng-bootstrap” gives us the best approach to use without any JS file in our Angular applications.

“ng-bootstrap” provides a module that can be load in our Angular apps which provides us native Angular components and widgets that we can use in the same way as we use other Angular provided components or our custom components. 

No 3rd Party libraries required

Since “ng-bootstrap” itself a module that encapsulates all of the Bootstrap functionality so there is no need to use any other 3rd party library into our Angular app. As a result, there is no dependency even on jQuery or on Bootstrap’s JavaScript library. Only dependencies are

Angular 4 and above

Bootstrap 4.0.0 (CSS file only, Bootstrap.js and Bootstrap.min.js are not required)

Browser Support with “ng-bootstrap” module

It supports all of the browsers that has the same…

Getting Started With “ng-bootstrap” In Angular 5 App

Comments are closed, but trackbacks and pingbacks are open.


Tag cloud