문제

I have an Ember application backed by CouchDB. Currently, my default route is:

App.ReadingsRoute = Ember.Route.extend( {
  model: function() {
    return this.store.find( 'reading' )
  }
} )

This pull entries from the all view. I would like to switch it to by_time, but I'm uncertain how to specify this.

도움이 되었습니까?

해결책

I figured it out digging through the code:

return this.store.findQuery( 'reading', {
  designDoc: 'reading',
  viewName: 'by_time',
  options: {
    descending: true
  }
} )
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top