Ember.js有没有办法创建自定义#ID .class名称而不是默认的ember? [英] Ember.js Is there a way to create a custom #ID .class name instead of default ember?
问题描述
例如:转过这个
< body class =ember-application>
< div class =ember-view>< / div>
< / body>
into:
code>< body class =myapp-application>
< div class =myapp-view>< / div>
< / body>
否
ember-application在Ember.EventDispatcher#setup中是硬编码的,ember-view类似于Ember.View中classNames属性中的静态字符串。因为'classNames'是一个连接的属性(这意味着子类将它们的值组合而不是替换它们),可以将'myapp-view'添加到classNames数组中,但是不能从超类中删除(容易)的值。 / p>
Is there a way to pass in a custom class or id namespace instead of the default ember?
example: turn this
<body class="ember-application">
<div class="ember-view"></div>
</body>
into:
<body class="myapp-application">
<div class="myapp-view"></div>
</body>
No.
"ember-application" is hardcoded in Ember.EventDispatcher#setup, and "ember-view" is similarly a static string in the classNames property on Ember.View. Because 'classNames' is a concatenated property (which means subclasses combine their values, instead of replace them), you can add 'myapp-view' to the classNames array, but you can't remove (easily) values from super classes.
这篇关于Ember.js有没有办法创建自定义#ID .class名称而不是默认的ember?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!