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

Vue example gives a syntax error #27

Closed
gensmann opened this issue Sep 24, 2017 · 2 comments
Closed

Vue example gives a syntax error #27

gensmann opened this issue Sep 24, 2017 · 2 comments

Comments

@gensmann
Copy link

The following example from the documentation

const names = require('dog-names').all;

new Vue({
  data(){
    return {
      list: names
    }
  },
  template: `
    <div>
      <RandomButton :variants="list" />
    </div>
  `
})

is giving a syntaxt error in chrome

image

@rafaesc
Copy link
Member

rafaesc commented Sep 24, 2017

Hello, make sure you have installed the package in your project, finally the example should be in the markdown.

@gensmann
Copy link
Author

I've fixed what i tried to do (render a list of available icons. However i must admin I'm not quite sure why/how this works, but it does. i wasn't aware that i could iterate using vue over a random variable not being part of a vue instace :-)

image

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