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 {
Label,
......@@ -93,14 +93,18 @@ export class PlayComponent implements OnInit, OnDestroy {
// 数据
data;
constructor() {
constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef) {
this.rightAudio.src = 'assets/right.mp3';
this.rightAudio.load();
this.wrongAudio.src = 'assets/wrong.mp3';
this.wrongAudio.load();
}
refresh() {
setTimeout(() => {
this.appRef.tick();
}, 1);
}
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