0

I render a component in Ember JS based on some property. Now the property changed. How can I re-render the component?

Here is my component structure:

Component
    type1  
         component.js  
         template.hbs  
    type2  
         component.js  
        template.hbs  
    component.js  
    template.hbs  
Aditya Kappagantula
  • 564
  • 1
  • 7
  • 21
  • Can you provide more info? Are you trying to switch between the two "type" components based on a property change on the parent component? – ianstarz Aug 18 '15 at 10:47
  • Should automatically re-render. You can view an example here: http://ember-twiddle.com/dd47192ee47c9441e16b. Check out the logs. You can add hooks for ``willClearRender`` and ``willInsertElement`` to tell you when a component is about to render. – Jeff Aug 18 '15 at 11:29
  • You should provide more code though if you want help. It's hard to go on what you've given us here. – Jeff Aug 18 '15 at 11:29

0 Answers0