diff --git a/src/app/play/play.component.ts b/src/app/play/play.component.ts index 3eaa99ab9e3367565d43481b8eb81ca45db4d969..a4e8febfe06efcd76b54ce108c66a64cbef18ebf 100644 --- a/src/app/play/play.component.ts +++ b/src/app/play/play.component.ts @@ -1,4 +1,4 @@ -import {Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener} from '@angular/core'; +import {Component, ElementRef, ApplicationRef,ChangeDetectorRef,ViewChild, OnInit, Input, OnDestroy, HostListener} from '@angular/core'; import { Label, @@ -32,7 +32,9 @@ export class PlayComponent implements OnInit, OnDestroy { // æ•°æ® data; - + constructor(private appRef: ApplicationRef, + private changeDetectorRef: ChangeDetectorRef) { + } ngOnInit() { @@ -55,6 +57,8 @@ export class PlayComponent implements OnInit, OnDestroy { window["air"].hideAirClassLoading(this.saveKey, this.data); } + this.refresh(); + }, this.saveKey); } @@ -141,6 +145,10 @@ export class PlayComponent implements OnInit, OnDestroy { } } - + refresh() { + setTimeout(() => { + this.appRef.tick(); + }, 1); + } }