Importations and declarations 

Just as with our collapse component, if you try and run the project at this point, you'll get a few errors—and for the same reasons—since we've not set up our imports and declarations in our app.module.ts file for this component. You know the drill.

Add this import line after the import line we had added for our playground and collapse components:

import { NgbModalComponent } from './ngb-modal/ngb-modal.component';

And add NgbModalComponent to the declarations array.

I know you're getting the hang of this. Let's get some more practice with this by integrating one more NGB widget to our playground view—and as a bonus, we'll take a sneak preview of Angular'HttpClient module. We'll be using the HttpClient module to fetch the images for our carousel, and we'll also be using the HttpClient module to call our APIs in Chapter 11Dependency Injection and Services

So let's stretch our legs and arms, fill up our cups with coffee, and move on to one of the more interesting components (and what will be the start of the show in our example application), the NGB carousel. 

..................Content has been hidden....................

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