X 归档 2024-06-04
Ok, let's improve on that. What we really want is to use `@HostBinding` on getters to control host directives. We can now do this with `computed`, updated the example:
https://stackblitz.com/edit/host-directive-binding
Signals are unlocking so much great patterns in #Angular! https://t.co/TSXD0vO1u0
https://stackblitz.com/edit/host-directive-binding
Signals are unlocking so much great patterns in #Angular! https://t.co/TSXD0vO1u0
好,我们来改进一下。我们真正想要的是在 getter 上使用 `@HostBinding` 来控制宿主指令。现在可以用 `computed` 做到了,示例已更新:
Signals 正在为 #Angular 解锁超多优秀的模式! https://t.co/TSXD0vO1u0
Signals 正在为 #Angular 解锁超多优秀的模式! https://t.co/TSXD0vO1u0

