Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

riot-tag as expression in loop #1368

marvinroger opened this issue Nov 19, 2015 · 2 comments

riot-tag as expression in loop #1368

marvinroger opened this issue Nov 19, 2015 · 2 comments


Copy link

@marvinroger marvinroger commented Nov 19, 2015



var nodes = [{ type: "customtag" }];

The following doesn't render the tag:

<div riot-tag="{ type }" each="{ nodes }"></div>

However, replacing manually the riot-tag with the name of the tag does work.

Am I doing something wrong?

Copy link

@lloydzhou lloydzhou commented Nov 20, 2015

you can try to call riot.mount() on "mount" event:

<div class="sub_class" riot-tag={ type } each={ nodes }>
this.on('mount', function(){
Copy link

@marvinroger marvinroger commented Nov 23, 2015

Thanks, it works. But now, the problem is passing an object through attribute doesn't work. (e.g <div riot-tag="{ type }" each="{ nodes }" object={ object }></div>. I don't have access to opts.object from the tag. Again, replacing manually riot-tag with the name of the tag corrects the issue.

@rsbondi rsbondi self-assigned this Dec 19, 2015
@GianlucaGuarini GianlucaGuarini added this to the 3.0.0 milestone Jul 23, 2016
@rsbondi rsbondi removed their assignment Jul 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.