diff --git a/src/app/play/play.component.ts b/src/app/play/play.component.ts index 73991a1c2182277fc6b9896db5a1ca10e47eb841..6e5b40fe1ede539fc04e53dd0d646394c313fd42 100644 --- a/src/app/play/play.component.ts +++ b/src/app/play/play.component.ts @@ -5,6 +5,7 @@ OnChanges, OnInit, AfterViewInit, ElementRef, ViewChild, + ApplicationRef } from '@angular/core'; import * as _ from 'lodash'; @@ -35,7 +36,7 @@ export class PlayComponent implements OnInit, OnDestroy, OnChanges, AfterViewIni curItemUrl = ''; curEvt; - constructor() { + constructor(private appRef: ApplicationRef) { } range(start, end) { @@ -46,7 +47,8 @@ export class PlayComponent implements OnInit, OnDestroy, OnChanges, AfterViewIni let _this = this; (<any>window).courseware.getData(function(data){ if(data){ - _this.data.contentObj.titleObj = data; + _this.data.contentObj.titleObj.content = data.content; + _this.appRef.tick(); } });