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

It would work in a vue.js app or only vuetify? #2

Open
dea398 opened this issue Dec 5, 2019 · 4 comments
Open

It would work in a vue.js app or only vuetify? #2

dea398 opened this issue Dec 5, 2019 · 4 comments

Comments

@dea398
Copy link

dea398 commented Dec 5, 2019

Hi, I would like to use voila in a vue.js app. I haven't tried yet but let me ask you if it is possible to do that

@mariobuikhuizen
Copy link
Owner

It is possible to do that. example_site/voila-embed.js should be adapted to not use vuetify. Your vue.js app should include example_site/voila-embed.js and use the jupyter-widget-embed component:

<jupyter-widget-embed
    voila-url="<voila-url>"
    notebook="<notebook>.ipynb"
    mount-id="<mount-id>"
></jupyter-widget-embed>

to mount widgets from Voila.

@dea398
Copy link
Author

dea398 commented Dec 5, 2019

Thanks. Sorry to bother you but If I am using vue component where should I load the voila-embed.js (main.js or in the script area of the myComponent.vue or in the App.vue) or and how ? . I am new to vue and web development. I'm coming from c#/c++ and web tech have been changed a lot.

@dea398
Copy link
Author

dea398 commented Dec 6, 2019

Hi, now I know where to use external js in vue. I am able to make a leapMotion work in vue.js. But, before to try an adaptation voila-embed.js for vue.js I need to make it work with your example. But it wont work. I am just opening the html file and it doesn't work. Do I need to do something else?.

What I understood is that I can use it in any existing web page and without launching a jupyter server. I understand it well? I am using vue.js + flask + vscode

@mariobuikhuizen
Copy link
Owner

Thanks. Sorry to bother you but If I am using vue component where should I load the voila-embed.js (main.js or in the script area of the myComponent.vue or in the App.vue) or and how ? . I am new to vue and web development. I'm coming from c#/c++ and web tech have been changed a lot.

This is probably not a beginner friendly task. It also depends on the structure/stack used on your project. The difficulty mainly lies in combining a module loader (used in Voila) and a module bundler (probably and rightly so, used in your project). Even if I knew the structure/stack used on your project, I couldn't answer this off the top of my head.

What I understood is that I can use it in any existing web page and without launching a jupyter server. I understand it well? I am using vue.js + flask + vscode

You still need the Voila server (instead of the jupyter server) for starting kernels and running notebooks in them. Maybe you could first try to get the example described in the readme running.

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