vendredi 27 mai 2016

How do I supply an index route with a template Ember 2?

I want to create an ember application as follows:

var app = Ember.Application.create({
  rootElement: document.getElementById('root'),
  name: 'my-application',
  IndexRoute: Ember.Route.extend({
      model: function() {
        console.log('model');
      },
      afterModel: function(model, transition) {

      },
      template: Ember.Handlebars.compile('<div id="test"></div>'),
    }),
  locationType: 'hash',

});

The problem is that I dont get the test div in the DOM. How come?

http://ift.tt/1TJFi6f




Aucun commentaire:

Enregistrer un commentaire