开发过程中:
使用了:
// ts
public msgDetail:any={ };
// html
{{msgDetail?.description||""}}
是会报错的
Property 'topicKey' does not exist on type '{}'
可以给msgDetail=null;
public msgDetail:any=null; // 这样不会报错的
开发过程中:
使用了:
// ts
public msgDetail:any={ };
// html
{{msgDetail?.description||""}}
是会报错的
Property 'topicKey' does not exist on type '{}'
可以给msgDetail=null;
public msgDetail:any=null; // 这样不会报错的