vin*_*206 5 javascript ember.js
我想要这样的事情:
App.SimplyHelloComponent = Em.Component.extend({
                       classNames: ['bold', 'italic', 'blue']
                       templateName:'my-temp'
                });
小智 0
这是可行的,但'components/'会作为前缀添加到templateName提供的查找中。
因此,如果您想使用该名称'my-temp',请使用
<script type="text/x-handlebars" data-template-name="components/my-temp">
...
</script>
对于内联模板,或者让构建工具my-temp从components/模板子目录预编译模板。