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

How about add vue.js support? #792

Open
vmvwebworks opened this issue Dec 12, 2017 · 11 comments
Open

How about add vue.js support? #792

vmvwebworks opened this issue Dec 12, 2017 · 11 comments

Comments

@vmvwebworks
Copy link

It's possible to add vue.js support?

@thom801
Copy link

thom801 commented May 21, 2018

I use vue.js in Slim quite a bit. What are you having trouble with?

@vmvwebworks
Copy link
Author

vmvwebworks commented May 22, 2018

how you do it? Rails App?

@thom801
Copy link

thom801 commented May 22, 2018

You just use the directive tags like normal but make them slim syntax.

.signed-in v-if="user"
  = "Wecome, {{ user.name }}"
  a.sign-out-button v-on:click="signOut" Sign out

@vmvwebworks
Copy link
Author

a good gem? they are also this, how can i well integrate without a complexity? https://github.com/vuetifyjs/vuetify i use Turbolinks, all ok?

@smoothdvd
Copy link

smoothdvd commented Sep 7, 2018

@thom801 How to use <style scoped></style> in slim? css: only generate <style type="text/css"></style>

@andrew-koster-
Copy link

For example, you can't do this: span.taxonomyTitle {{ category.title }}

Or you get this error: Slim::Parser::SyntaxError Expected attribute

Why? The curly braces don't mean anything special in Slim, so why won't it just leave them alone? Why do I have to do a weird trick to show the curly braces?

@andrew-koster-
Copy link

Re-read the Slim syntax docs, and I see that there are three (!!!) equivalent ways to delimit HTML attributes, IN ADDITION to not using a delimiter at all.

Why do we need to be able to mix-and-match [], () and {}? Why do we need three different types of parentheses that do the exact same thing? This is the kind of anti-feature that people use as an argument against Slim.

Pick one, tell us what it is, and we'll stick to that. And don't pick {}. That will conflict with every client-side template engine on the planet.

@andrew-koster-
Copy link

andrew-koster- commented Aug 23, 2019

Sure, you can do this to fix the bug: https://stackoverflow.com/questions/17687389/slim-template-interprets-myjsvar-as-html-attribute-grouping

But why isn't this behavior just the default? It doesn't make sense that someone should have to spend extra time searching, reading and configuring, just to get a sensible default that's compatible with client-side code.

Again, this is the kind of anti-feature that people bring up when I propose using Slim.

@pyrareae
Copy link

Related note: pug, which is based on slim can be used within vue components in the webpacker asset pipeline.

@noraj
Copy link
Contributor

noraj commented Aug 25, 2020

similar issue: #722

@brauliobo
Copy link

Related note: pug, which is based on slim can be used within vue components in the webpacker asset pipeline.

I don't like pug, is there something more similar to slim?

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

7 participants