Wrapping Up

Finish up the Ionic Jukebox case study with a few final modifications.

Final steps

We only have two remaining steps before the application is complete:

  1. Configure the application root module with the HttpClientModule import.
  2. Install and configure Electron and publish the application as an Electron app.

Rooting the application

In the application root module located at src/app/app.module.ts, we make the following amendments (highlighted):

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

That’s all we need for the root module. How short and sweet!

Publishing as an Electron app

Now let’s publish our Ionic Jukebox player as an Electron application.

In your system terminal, run the following command-line instruction: ...