Render template from component and get DOM element


Hi, I’m trying to do something like this:

var template = Ember.getTemplate ('my-template');
template.setParameter ('name', 'Julian');
var dom = template.getDOM (); 


Is this posible?


I think there is more context needed.

Within a component it is no problem.

You can do something like:

// app/components/my-component.js
MyComponent = Ember.Component.extend({
     name: 'Julian',
     becomeFocused: function() {
        var componentsDomElement = this.$();
        // doStuff

<div class="some-class">
    name: {{name}} <--- should automaticly resovle to Julian