import { Component, Inject, OnInit } from '@angular/core'; import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth'; @Component({ selector: 'layout-passport', templateUrl: './passport.component.html', styleUrls: ['./passport.component.less', './d.scss'] }) export class LayoutPassportComponent implements OnInit { constructor() {} ngOnInit(): void { // this.tokenService.clear(); this.loadJS(); // const particle = new Particle(); // particle.init(); } loadJS() { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = './assets/login/js/script.js'; script.id = 'particle'; document.getElementsByTagName('head')[0].appendChild(script); setTimeout(() => { var content = document.getElementById('content'); if (content) { content.style.overflow = 'auto'; } }, 100); } }