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

Classes properties in nested riot tags #39

Open
alexhome82 opened this issue Oct 20, 2016 · 2 comments
Open

Classes properties in nested riot tags #39

alexhome82 opened this issue Oct 20, 2016 · 2 comments

Comments

@alexhome82
Copy link

alexhome82 commented Oct 20, 2016

In nested tags have to use parent.parent ...., to access the class properties. How to solve this problem?

screenshot_4

Thank you

@alexhome82 alexhome82 changed the title Properties of class in nested tags Classes properties in nested tags Oct 20, 2016
@alexhome82 alexhome82 changed the title Classes properties in nested tags Classes properties in nested riot tags Oct 20, 2016
@nippur72
Copy link
Owner

this is an unsolved Riot (not RiotTS) problem we friendly call it "parent.parent hell". It's because Riot changes the evaluation context when there is a nested tag. No other template engine works this way (angular, react-templates etc), the general approach is to maintain one evaluation context per tag definition.

I once proposed a solution but it was not merged. See also riot/riot#972

@alexhome82
Copy link
Author

alexhome82 commented Oct 21, 2016

screenshot_5
when i use javascript with riot-loader, it works well
"riotjs-loader": "^3.0.0",
"riot": "^2.6.1",

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

No branches or pull requests

2 participants