Commit 931935f3 authored by Chen Jiping's avatar Chen Jiping

修复因异步问题导致配置页面加载失败问题

parent b1550397
......@@ -24,6 +24,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.item = {};
this.item.title = {};
this.item.exercisesArr = [];
// 获取存储的数据
(<any> window).courseware.getData((data) => {
......@@ -51,11 +55,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
init() {
if(!this.item.title){
this.item.title = {};
}
if(!this.item.exercisesArr){
if(!this.item.exercisesArr || this.item.exercisesArr.length == 0){
this.item.exercisesArr = [];
//初始化四道练习题
......
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