lundi 8 octobre 2018

EMBER JS - Fetch associated model data from back-end only when required

store.findRecord('school', school_id, {
                 include: [
                  'students',
                  'students.records'
                 ].join(',')

Using the above code fetching school, students, students' records data in inital load. In the initial load, I don't need students.records (only listing students initially)

Need student records only when clicking some button (All Students Performance - to display a performance chart) Is there any way to fetch associated records separately and link with the existing model

I have sperate api endpoint for fetch students' records




Aucun commentaire:

Enregistrer un commentaire