Commit a2f9ac99 authored by liujiaxin's avatar liujiaxin

sdf

parent b5a73f20
import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener, AfterViewInit } from '@angular/core';
import { ApplicationRef, ChangeDetectorRef, Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener, AfterViewInit } from '@angular/core';
import {
Label,
......@@ -61,7 +61,10 @@ export class PlayComponent implements OnInit, AfterViewInit, OnDestroy {
animationB = '';
saveKey = 'ww_talk';
constructor(private appRef: ApplicationRef,
private changeDetectorRef: ChangeDetectorRef) {
}
ngOnInit() {
this.data = {
......@@ -92,12 +95,20 @@ export class PlayComponent implements OnInit, AfterViewInit, OnDestroy {
this.data = data;
}
this.init();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
if (window['air']) {
window['air'].hideAirClassLoading(this.saveKey, this.data);
}
}, this.saveKey);
}
refresh() {
setTimeout(() => {
this.appRef.tick();
}, 1);
}
init() {
this.talkIdx = {
A: -1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment