Events List Module

Let's add the event list component and module and configure their routing. We’ll also add functions to display all our events.

We'll cover the following...

Now that our service method has been created, we can create our new feature module.

ng g module events-list --routing
ng g component events-list
Terminal 1
Terminal
Loading...

Here we’ll create a module and component, adding the --routing flag to our module so that the CLI automatically creates our EventsListRoutingModule file.

The first command, ng g module events-list --routing, created two files:

CREATE src/app/events-list/events-list-routing.module.ts
CREATE src/app/events-list/events-list.module.ts

The second command, ng g component events-list, created four files and updated one:

CREATE src/app/events-list/events-list.component.css
CREATE src/app/events-list/events-list.component.html
CREATE src/app/events-list/events-list.component.spec.ts
CREATE src/app/events-list/events-list.component.ts
UPDAT
...