5 changed files with 47 additions and 24 deletions
@ -1,29 +1,38 @@
|
||||
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 |
||||
) {} |
||||
|
||||
ngOnInit(): void { |
||||
|
||||
console.log("更新日期:20230728"); |
||||
// console.log("window.parent", window.parent.location.href);
|
||||
// alert(window.parent.location.href)
|
||||
// 监听父页面向子页面的传参
|
||||
// window.addEventListener("message", (e) => {
|
||||
// // 通过origin对消息进行过滤,避免遭到XSS攻击
|
||||
// // if (e.origin === "http://127.0.0.1:8001") {
|
||||
// // console.log("父页面传输过来参数", e.data);
|
||||
// // }
|
||||
// console.log("父页面传输过来参数", e);
|
||||
// });
|
||||
} |
||||
|
||||
ngAfterViewInit(): void { |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
ngAfterViewInit(): void {} |
||||
} |
||||
|
Loading…
Reference in new issue