jeudi 5 mai 2016

How to display single record in handlebars if ember data store has only one data?

This is sample data store and how to display this single data without using each in template.

enter image description here

import Ember from 'ember'; import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';

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

  setupController(controller, model) {
    console.log(model);
    console.log(model.mapBy('phone'));
  }
});




Aucun commentaire:

Enregistrer un commentaire