mardi 23 juin 2015

TypeError: newHandlerInfo is undefined in Ember.js application

My urls look like this:

Router.map(function() {
    this.resource('servers', { path: '/' }, function() {
        this.resource('server', { path: '/server/:serverid'}, function () {
            this.resource('database', { path: '/database/:databaseid'}, function () {
                this.resource('catalogues', { path: '/catalogues' });
                this.resource('eventtriggers', { path: '/eventtriggers' });
                this.resource('extensions', { path: '/extensions' });
                this.resource('schema', { path: 'schema/:schemaid' }, function () {
                    this.resource('tables', { path: '/table/:tableid' });
                });
                this.resource('replication', { path: '/replication' });
            });
        });
    });
});

And route for servers (index) subpage:

Ember.Route.extend({
    model: function () {
        return this.store.find('server');
    }
});

When I'm on the index page (/) I get the error mentioned in topic's title. If I replace the line above retrieving all server instances with return []; then this error doesn't appear. It's also absent on any other subpage. So what I'm doing wrong here?

I'm using Ember v 1.13.1 and DS version is 1.0.0-beta.19.1.




Aucun commentaire:

Enregistrer un commentaire