Why use NGB?

With the restrictions of not being able to have JavaScript-based components, nor directly using JavaScript libraries such as jQuery or Popper.js, you may be asking, why use NGB at all?

That's a good question. Here's the short answer, in point form:

  • Angular does not depend on jQuery. It uses its own implementation of jQuery, called jQLite, which is a subset of jQuery.
  • We don't lose out on being able to use any Bootstrap components that are powered by JavaScript (such as modal or carousel) because they are re-done for Angular in NGB. Again, NGB's sole purpose in life is to completely replace any JavaScript-powered Bootstrap components.
  • A rule of thumb when building Angular applications is to try to only use Angular-specific components; that is to say, components that are specifically made for Angular—such as NGB widgets and components from Angular Material. This, of course, includes creating your own custom Angular components. Though you can work around this by jerry-rigging non-Angular-specific components, it's not recommended. Angular is full featured, and as we've learned, it's also extremely extensible. It would be very difficult to think of a use case where sticking to Angular-specific components, modules, directives, pipes, services, and so on would prevent you from doing what you needed to do.
  • NGB is a solid Angular-centric component library and works well when you don't try to create workarounds that are discouraged.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.254.44