EmberJS - Finding Records



You can retrieve the records by using the Ember data store which uses store object's builtin method for finding the records based on the arguments.

The records can be retrieved of a given type by using the following method −

store.findAll()

Syntax

import Ember from 'ember';

export default Ember.Route.extend ({
   model() {
      return this.store.findAll('model_name');
   }
});

For more about finding records along with an example, see the following section.

emberjs_model.htm
Advertisements