Note that there are some explanatory texts on larger screens.

plurals
  1. POEmber Select-view error: Ember.CollectionView's content must implement Ember.Array
    primarykey
    data
    text
    <p>I want to simply render an Ember select view with the model defined in a route. Data is coming from fixtures adapter. When doing this, I receive the error: Ember.CollectionView's content must implement Ember.Array - You passed App.AuthorsController.</p> <p>How can I solve this ?</p> <p>See JSFIDDLE: <a href="http://jsfiddle.net/cyclomarc/frvJZ/4/" rel="nofollow">http://jsfiddle.net/cyclomarc/frvJZ/4/</a></p> <p>(after running the app, click on the 'Authors' link to goto the authors route with authorsController data.</p> <p><strong>CODE-HTML:</strong></p> <pre><code>&lt;script type="text/x-handlebars" data-template-name="application"&gt; &lt;h1&gt;Ember select view&lt;/h1&gt; {{#linkTo 'authors'}}Authors{{/linkTo}} {{outlet}} &lt;/script&gt; &lt;script type="text/x-handlebars" data-template-name="authors"&gt; {{view Ember.Select contentBinding="App.AuthorsController"}} &lt;/script&gt; </code></pre> <p><strong>CODE-JS:</strong></p> <pre><code>window.App = Ember.Application.create(); App.Router.map(function () { this.resource('authors', { path: "/authors" }); }); App.AuthorsRoute = Ember.Route.extend({ model: function () { return App.Author.find(); } }); App.AuthorsController = Ember.ArrayController.extend({}) //DATA //define model for category App.Author = DS.Model.extend({ name: DS.attr('string'), language: DS.attr('string') }); App.Store = DS.Store.extend({ revision: 12, adapter: 'DS.FixtureAdapter' }); App.Author.FIXTURES = [ { id: 1, name: 'Luc Verschuren', language: 'German' }, { id: 2, name: 'Patrick Burms', language: 'Dutch' }, { id: 3, name: 'Jean Demeester', language: 'French' } ]; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload