我有两个组成部分:SpecialButtonComponent和SpecialButtonDerivativeComponent.
该SpecialButton组件自动使用在的模板/app/templates/components/special-button.hbs.
我想SpecialButtonDerivativeComponent使用相同的模板,但到目前为止,我没有运气尝试使用这种技术:
// app/components/special-button-derivative.js
import SpecialButtonComponent from './special-button';
export default SpecialButtonComponent.extend({
templateName: 'components/special-button'
});
Run Code Online (Sandbox Code Playgroud)
我也尝试使用layoutName而不是templateName,但仍然没有运气.有任何想法吗?