vendredi 30 novembre 2018

setupController is not working for hasMany data

here is my code. when a user has only 1 property code is working fine but in case of multiple properties. setupController and aftercontroller is not working

 model: ->
    return @get('session.currentUser.properties')

 setupController: (controller, model)->
     controller.set('properties', model)

user model is

Userr = DS.Model.extend(
  email: DS.attr('string')
  telephone: DS.attr('string')
  properties: DS.hasMany('property', { async: true })
)

`export default User`




Aucun commentaire:

Enregistrer un commentaire