{{my-component can-delete=true canDelete=true}}
在my-component
模板中,我想从can-delete
对象访问attrs
。
{{attrs.can-delete}} <!-- does not work, prints blank, should print true -->
{{attrs.canDelete}} <!-- works, prints true-->
我尝试使用get helper
{{get attrs 'can-delete'}}
但收到错误Uncaught Error: Assertion Failed: The first argument to {{get}} must be a stream
如何从不常用格式的HTMLBars中访问对象属性?