I am trying to accomplish pretty simple thing: connect books to authors with many-to-many relationship, and then be able to display a list of authors on every book's page. I got it working with a setup shown below, but it works under one condition: I need to view authors page (fetch all the authors) before I view any of the book's pages. If I don't do it in this order I get:
Uncaught TypeError: Cannot read property 'destroy' of undefined ember.js:40514
ContainerView.extend.arrayWillChange ember.js:40433
(anonymous function) ember.js:19677
applyStr ember.js:14115
sendEvent ember.js:17473
notifyBeforeObservers ember.js:17249
propertyWillChange ember.js:17760
set...
At first I thought that there is a problem with my REST server, but after changing adapter to the one using fixtures the issue isn't solved.
My project is set up in a following way.
(I included only one template that is showing a single book with it's authors, this is where the error occurs).
What could be the issue here? Should I somehow make it fetch all the authors before going into book's details?
Aucun commentaire:
Enregistrer un commentaire