mercredi 27 septembre 2017

Accessing Store data in service Ember js

I am trying to peek a store from the service, by injecting the store in my service. The peekRecord function returns a Class. What is the best way to access the record that the store returns?

As peekRecord is synchronous I tried like:

const hasPermission = this.get('store').peekRecord('system/permission','PlatformRead');
console.log(hasPermission.data);

Is there any Ember specific way to access the record that's returned from the store?




Aucun commentaire:

Enregistrer un commentaire