feat: started working on PWA app
This commit is contained in:
25
apps/NwaifuAnime/src/app/app.component.ts
Normal file
25
apps/NwaifuAnime/src/app/app.component.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Component } from "@angular/core";
|
||||
import { RouterModule } from "@angular/router";
|
||||
import { AppService } from "./app.service";
|
||||
import { NxWelcomeComponent } from "./nx-welcome.component";
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [NxWelcomeComponent, RouterModule],
|
||||
selector: "app-root",
|
||||
templateUrl: "./app.component.html",
|
||||
styleUrl: "./app.component.less",
|
||||
providers: [AppService],
|
||||
})
|
||||
export class AppComponent {
|
||||
title = "NwaifuAnime";
|
||||
constructor(private sw: AppService) {}
|
||||
|
||||
get hasUpdate() {
|
||||
return this.sw.isUpdateAvailable;
|
||||
}
|
||||
|
||||
update() {
|
||||
this.sw.update();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user