I wanted to try out some of the new stuff in JS, so I chose to do Node and Ember.js I have read that Ember.js is agnostic to the templating engine, so I was wondering whether it supports EJS, since that is supported by node, and is quite similar to ERB, what I am used to.
Thanks
You can use Ember views just like Backbone views if you don't want to use Handlebars. However, we did a significant amount of work to make Handlebars templates update automatically when their underlying properties change. Keep in mind that if you use a template engine other than Handlebars, auto-updating (a big part of the appeal of Ember IMO) will not happen.
That being said, you can set the template
property of any view to a function that returns a string, and it will render it to the screen.
var view = Ember.View.create({
template: function() { return "Hi there!" }
});
view.appendTo('#container');
If you'd like more details, please see the blog post I wrote on the SproutCore blog about why we picked Handlebars: http://blog.sproutcore.com/why-handlebars/
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