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

Pass arguments to partial #4

Open
nicmosc opened this issue Aug 11, 2018 · 1 comment
Open

Pass arguments to partial #4

nicmosc opened this issue Aug 11, 2018 · 1 comment

Comments

@nicmosc
Copy link

nicmosc commented Aug 11, 2018

When loaded in JS, is there any way you can pass variables to the partial? This is needed if you have some conditional rendering within the partial, e.g.:

.PCard__expand
      - if label
        .PCard__label = label
@MaxPleaner
Copy link
Owner

I guess maybe there's a slimrb compiler that works in the browser that could be used...

however without that, I don't know how it could be done .... currently the slim is compiled server-side before the website is served ... and since we cannot pass variables in require calls (webpack requires them to be 'statically analyzable') I'm not sure how we would pass that info over to webpack.

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