I have component:
@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;
}
I need bind to my host element background.I'm getting Background in rxjs object(Observable), so I added "async", but I'm getting error message: "Template parse errors: The pipe 'async' could not be found".
How can I make it work?