【发布时间】:2019-07-19 13:29:25
【问题描述】:
我正在尝试使用新的基于角度的语法调用在父组件中定义的名为 icon-plus-button 的组件,称为可扩展项 旧的方式是这样的
{{#expandable-items/icon-plus-button
expandedText=
text=(t 'sideBarNav.dashboard')
expanded=expanded linkTo='dashboard'
toggleExpanded={{action "toggleExpanded"}}
}}
{{fa-icon "line-chart"}}
{{/expandable-items/icon-plus-button}}
而新方法类似于
<ExpandableItemsIconPlusButton
@expanded={{this.expanded}}
@expandedImage={{fa-icon "angle-double-left"}}
@expandedText={{t "sideBarNav.collapseMenu"}}
@toggleExpanded={{action "toggleExpanded"}}
/>
我收到此错误消息
opcode-compiler.js:140 Uncaught Error: Compile Error: Cannot find component expandable-items-icon-plus-button
at opcode-compiler.js:140
at Compilers.compile (opcode-compiler.js:42)
at compile (opcode-compiler.js:718)
at LazyCompiler.add (opcode-compiler.js:912)
at CompilableBlock.compile (opcode-compiler.js:707)
at Object.evaluate (runtime.js:717)
at AppendOpcodes.evaluate (runtime.js:69)
at LowLevelVM.evaluateSyscall (runtime.js:3270)
at LowLevelVM.evaluateInner (runtime.js:3216)
at LowLevelVM.evaluateOuter (runtime.js:3208)
【问题讨论】:
标签: javascript ember.js frameworks