Recently we have started a wide scale upgrade of our EmberJS system. And currently we are at 2.11 version of ember. With EmberJS 2.11
Ember.HTMLBars.template
and
Ember.Handlebars.template
all come via a single template function and expect JSON (ie. compiled glimmer2 template)
Currently trying to get a simple "Hello world" message appeared. I have routes working, but Ember.HTMLBars.template expect glimmer2 JSON.
How do I make "Hello world" glimmer template and compile it to JSON?
Ember expects JSON something like
Ember.TEMPLATES["test/fixtures/simple"] = Ember.HTMLBars.template({"id":null,"block":"{\"statements\":[[\"open-element\",\"p\",[]],[\"flush-element\"],[\"text\",\"Hello, my name is \"],[\"append\",[\"unknown\",[\"name\"]],false],[\"text\",\".\"],[\"close-element\"]],\"locals\":[],\"named\":[],\"yields\":[],\"blocks\":[],\"hasPartials\":false}","meta":{}});
I have got http://ift.tt/1X7w6Wp built, but not sure what to do next. At the end, I need to get basic hello_world.hbs to compile into JSON. I am a very new person in this area.
Any help appreciated
Thank you
Dimi
Aucun commentaire:
Enregistrer un commentaire