Commit 089832c9 authored by liujiaxin's avatar liujiaxin

www

parent 8a5c234c
import {Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener} from '@angular/core'; import {ChangeDetectorRef, ApplicationRef, Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener} from '@angular/core';
import * as _ from 'lodash'; import * as _ from 'lodash';
import { import {
Label, Label,
...@@ -93,14 +93,18 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -93,14 +93,18 @@ export class PlayComponent implements OnInit, OnDestroy {
// 数据 // 数据
data; data;
constructor() { constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef) {
this.rightAudio.src = 'assets/right.mp3'; this.rightAudio.src = 'assets/right.mp3';
this.rightAudio.load(); this.rightAudio.load();
this.wrongAudio.src = 'assets/wrong.mp3'; this.wrongAudio.src = 'assets/wrong.mp3';
this.wrongAudio.load(); this.wrongAudio.load();
} }
refresh() {
setTimeout(() => {
this.appRef.tick();
}, 1);
}
ngOnInit() { ngOnInit() {
......
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