client-side source code

The client-side source code is under the src/main/webapp folder, as we saw earlier. The structure is as follows:

The most noteworthy among these are:

platformBrowserDynamic().bootstrapModule(StoreAppModule)
.then((success) => console.log(`Application started`))
.catch((err) => console.error(err));
@NgModule({
imports: [
BrowserModule,
...
StoreEntityModule,
// jhipster-needle-angular-add-module JHipster
will add new module here
],
declarations: [
JhiMainComponent,
...
FooterComponent
],
providers: [
ProfileService,
...
UserRouteAccessService
],
bootstrap: [ JhiMainComponent ]
})
export class StoreAppModule {}

 

<!doctype html>
<html class="no-js" lang="en" dir="ltr">
<head>
...
</head>
<body>
...
<jhi-main></jhi-main>
<noscript>
<h1>You must enable javascript to view this page.</h1>
</noscript>
...
</body>
</html>
To enable PWA mode using service workers, just uncomment the corresponding code in src/main/webapp/index.html to register the service worker.  JHipster uses workbox (https://developers.google.com/web/tools/workbox/), which creates the respective service worker and dynamically generates the sw.js.