私はこのようなことをしたい:
App.SimplyHelloComponent = Em.Component.extend({
classNames: ['bold', 'italic', 'blue']
templateName:'my-temp'
});
私はこのようなことをしたい:
App.SimplyHelloComponent = Em.Component.extend({
classNames: ['bold', 'italic', 'blue']
templateName:'my-temp'
});
はい、テンプレート名を指定できます。私は試してみましたが、うまくいきます。方法は次のとおりです。
App.SimplyHelloComponent = Ember.Component.extend({
layoutName: 'components/my-temp'
});
script type="text/x-handlebars" data-template-name="components/my-temp">
...
</script>
ここで、次のようにコンポーネントを呼び出します。
{{simply-hello}}