First of all I’ll explain what I want to archieve because maybe I’m taking the wrong way.
I want to have a textarea where I write a Handlebars template and a div in the page where that template is rendered live, as I am writting it (unless it has syntax errors). Is for an interactive presentation.
My approach right now was to create a application and in its IndexView
define a template: Ember.Handebars.compile("Hello {{name}}")
.
Outside the application, I listen for the keyup event on the textarea to get the new text live.
I tried to get the view instance and set('template', ...)
I also tried to reopen the App.IndexView
and override the template.
Also tried both ideas and called rerender()
on the view.
No effect, the view is never updated. Any idea?