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>
You can pass in a custom id, instead of the default "ember-[numview]".
Just set the elementId
field of the Ember.View
Class
var mainView = Ember.View.create({
tagName: "section",
elementId: "main"
})
will generate:
<section id="main" class="ember-view">
</section>
To remove/modify the default className "ember-view", you need find and edit the classNames field on the PrototypeMixin on the View class...
Em.View.PrototypeMixin.mixins[2].properties.classNames = []
var mainView = Ember.View.create({
tagName: "section",
elementId: "main"
})
will generate:
<section id="main">
</section>
No idea about the side effects...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With