邵佳豪
2 years ago
2 changed files with 31 additions and 20 deletions
@ -1,29 +1,39 @@
|
||||
import { Component, TemplateRef, ViewChild } from '@angular/core'; |
||||
import { HttpClient } from '@angular/common/http' |
||||
import { Router, ActivatedRoute } from '@angular/router' |
||||
import { CacheTokenService } from './service/cache-token.service'//引入服务
|
||||
import { Component, TemplateRef, ViewChild } from "@angular/core"; |
||||
import { HttpClient } from "@angular/common/http"; |
||||
import { Router, ActivatedRoute } from "@angular/router"; |
||||
import { CacheTokenService } from "./service/cache-token.service"; //引入服务
|
||||
|
||||
import "reflect-metadata"; |
||||
import { NzNotificationService } from 'ng-zorro-antd/notification'; |
||||
import { NzNotificationService } from "ng-zorro-antd/notification"; |
||||
@Component({ |
||||
selector: 'app-root', |
||||
templateUrl: './app.component.html', |
||||
styleUrls: ['./app.component.scss'] |
||||
selector: "app-root", |
||||
templateUrl: "./app.component.html", |
||||
styleUrls: ["./app.component.scss"], |
||||
}) |
||||
export class AppComponent { |
||||
|
||||
@ViewChild(TemplateRef, { static: false }) template?: TemplateRef<{}>; |
||||
|
||||
constructor(private http: HttpClient, private router: Router, public token: CacheTokenService, private notificationService: NzNotificationService) { } |
||||
|
||||
constructor( |
||||
private http: HttpClient, |
||||
private router: Router, |
||||
public token: CacheTokenService, |
||||
private notificationService: NzNotificationService |
||||
) {} |
||||
VERSION = 20230712; |
||||
ngOnInit(): void { |
||||
|
||||
this.sayHello(); |
||||
} |
||||
|
||||
ngAfterViewInit(): void { |
||||
|
||||
sayHello() { |
||||
let _a; |
||||
if (navigator.userAgent.toLowerCase().indexOf("chrome") > -1) { |
||||
const args = [ |
||||
"\n %c 版本号 - " + this.VERSION + "\n", |
||||
"color: #ff66a5; background: #000000; padding:5px 0;", |
||||
]; |
||||
(_a = window.console).log.apply(_a, args); |
||||
} else if (window.console) { |
||||
window.console.log("\n %c 版本号 - " + this.VERSION + "\n"); |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
ngAfterViewInit(): void {} |
||||
} |
||||
|
Loading…
Reference in new issue