Quantcast
Viewing all articles
Browse latest Browse all 4826

Dynamically rendering a component

@Mohana_Priya wrote:

I want a component to be re-rendered with different attributes on chaninging a controller property. So, I have my code like,

{{#if (eq diffView "type1")}}
   {{comp/mycomp diffId=diffFile.id  diffIdPrefix=diffView view=diffView thisCtrl=thisCtrl commitDiff=diffFile.diff filePath=diffFile.fileName}}
{{else}}
   {{comp/mycomp diffId=diffFile.id  diffIdPrefix=diffView view="line-by-line" thisCtrl=thisCtrl commitDiff=diffFile.diff filePath=diffFile.fileName}}
{{/if}}

Changing the property diffView, throws me error like, vendorrepository.js:13602 Uncaught DOMException: Failed to execute ‘removeChild’ on ‘Node’: The node to be removed is not a child of this node. at clear(…) at UpdatableBlockTracker.reset (…) at TryOpcode.handleException (…)

This error was inside ember source code. I think there was some error trying to remove the older component. Pls help me out with this issue.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles