Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4829

Model relation passed to component not available

$
0
0

@actorius wrote:

Hello!

I have a trouble with accesing relation on model passed to component/ Model example:

name: DS.attr('string'),
rel: belongsTo('something')

component calling:

{{cp m=model}}

component template (here all fine, i see relation visible property value):

{{m.rel.visible}}

component.js (here returnerd value is undefined, why?)

export default Ember.Component.extend({
    isVisible: Ember.computed(function(){
    return this.get('m').get('rel').get('visible');    
  }),
}

P.S. Cannot format code...

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles