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

Computed property from controller to component doesn't work

$
0
0

@johnunclesam wrote:

Here is my code on EmberTwiddle:

https://ember-twiddle.com/cc6b2ef203c68c272ad29f460aca5432

I'm trying to set a computed property in a component on a property that changes in a controller.

I pass the property from controller to component like this:

{{my-posts category=category}}

but the computedProperty on the component doesn't work:

postsFiltered: Ember.computed('category', function () {
  console.log('computed postsFiltered() with category: ' + this.get('category'));
  this.set('myMessage', 'This is the message!');
}),

Why?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles