7
我通過添加角動畫主機元素
@Component({
....,
animations: [
trigger('slideIn', [
...
])
],
host: {
'[@animation]': 'condition'
}
}
它運作良好,在編譯有人告訴我不贊成這種方式,我應該使用@HostBinding添加動畫到主機...
@HostBinding('[@animation]') get slideIn() {
return condition;
}
這引發了我一個錯誤
Can't bind to '[@animation' since it isn't a known property of 'my-component-selector'.
,但我不能添加動畫到我的模塊..我能做些什麼?