Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

Appending child path in route

$
0
0

@vinamelody wrote:

Hi, my Firebase data only has 1 user right now with data structure like this:

root {
  fxJXvLoL9gezsXLOSBc50KqVlb43 {
    books {
      -KOJVTFtYUBZA1jWE5ZH: {
        title: "Some title"
        qty: 5
       },
      -KOJd9MSdA3cpBspHnKo {
         title: "Another title"
         qty: 2
       },
   }
}

Before adding the userID (fxJXvLoL9gezsXLOSBc50KqVlb43) , I can query this book using

import Ember from 'ember';

export default Ember.Route.extend({
	model: function() {
		return this.store.query('book', {
			orderBy: 'qty',
			limitToLast:3
		});
	}
});

But with the addition of UserID (fxJXvLoL9gezsXLOSBc50KqVlb43)
the code no longer works.

How can I hard code the path to add only for this one UserID?

Thanks for your help!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles