简体   繁体   中英

Is replaceable attribute obsolete in aurelia 1.0?

我的印象是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 a repeat , if or other template controller. So, we still support placing the part attribute on a template controller's element and overriding it by using replace-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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM