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

Use riot instead of this to share globally a mixing #877

Closed
wants to merge 1 commit into from

Conversation

k33g
Copy link
Contributor

@k33g k33g commented Jun 26, 2015

this.mixin('mixinName') does not work, but it's ok with riot.mixin('mixinName')

<my-tag>
    <h1>{ opts.title }</h1>

    riot.mixin('mixinName')
</my-tag>

@cognitom
Copy link
Member

this.mixin('mixinName') is correct.

Check this line.

If you have trouble to use mixin, feel free to open a new issue. Thanks.

@cognitom cognitom closed this Jun 26, 2015
@k33g k33g mentioned this pull request Jun 26, 2015
@k33g
Copy link
Contributor Author

k33g commented Jun 26, 2015

@cognitom ok issue is created, see #879, it's only about the global sharing. If you run my example, this is ko, riot is ok. To my mind, it's not a bug (It seems fine to use riot.mixin() as a kind of static method to share object). I think, this is just an error in the documentation.
Regards
Philippe

@cognitom
Copy link
Member

@k33g I agreed that the documentation of mixin is little bit poor. I think we need more examples. Your help on the documentation is always welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants