1
我有组分:角2主机异步结合
@Component({
selector: 'my-selector',
template: `<div>html code goes here</div>
`,
host: {
'[style.background]': "'url(' + (myobj | async).background + ') 50% no-repeat'"
},
styleUrls: ['myComponent.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class MyComponent {
@select(getMyobj)
myobj: Myobj;
}
我需要绑定到我的主机元件background.I'm得到背景在rxjs对象(观察不到),所以我说“异步”,但我m得到错误消息:“模板解析错误:无法找到管'异步'”。
我该如何让它工作?