Search⌘ K
AI Features

Rooting the Application

Explore how to configure the app root module and shared components within an Ionic Angular project. Learn to implement the MoviedbApiService to interact with TheMovieDB API, enabling movie data retrieval, genre filtering, and cast information for a cross-platform movie app.

The app root module

Within the src/app/app.module.ts Angular module, we make the following changes (highlighted):

TypeScript 3.3.4
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [
BrowserModule,
HttpClientModule,
IonicModule.forRoot(),
AppRoutingModule
],
providers: [
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
],
bootstrap: [AppComponent]
})
export class AppModule {}

Now let’s take time to perform some further adjustments, within the SharedComponentsModule.

Changes in the SharedComponentsModule

In the ...