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

Setting component property

$
0
0

@tsatsmt wrote:

Hi,

Here is my scenario.

I have an external component that slides multiple instances of a component contents within. More like a carousel with only one pic in view.

example:

  {{#componentA}}
    {{componentB}}
    {{componentC}}
  {{/componentA}}

In my componentB, I have a visible property that is set to false by default.

export default Ember.Component.extend({
	visible: false,

my componentC triggers an action that I pass all the way to componentA

I want to set the visible variable in componentB to false/true based on the logic in componentC. this.container.lookup('component:componentB') gets me the specific instance of the component B that I need. this.container.lookup('component:componentB').get('visible') returns me false as well. but this.container.lookup('component:componentB').set('visible', true) does not seem to work.

Appreciate your help.

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles