我的印象是slot
取代了replaceable
,但我被告知replaceable
是在1.0版本中重新引入的,是真的吗?
replaceable
still exists due to a use-case that isn't covered by slots in the Shadow DOM v1 spec:
The new Shadow DOM v1 spec has support for slot "fallback content". As a result, our
replaceable
attribute is no longer needed and has been removed in favor of slot fallbacks. However, slots do not solve the problem of replacing a template that is used by arepeat
,if
or other template controller. So, we still support placing thepart
attribute on a template controller's element and overriding it by usingreplace-part
in the element's content.http://blog.durandal.io/2016/06/08/getting-prepared-for-aurelia-1-0-0-rc/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.