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 on top of pure JSP #214

Open
dsultanr opened this issue Aug 30, 2021 · 0 comments
Open

Vue on top of pure JSP #214

dsultanr opened this issue Aug 30, 2021 · 0 comments

Comments

@dsultanr
Copy link

Hi! Very impressive and descriptive project. Thanks!

Sorry for asking the question beyond the scope of the project, but couldn't find your contacts

I'm trying to inject this Vue app into my existing JSP based project. I did already successfully build that Vue app. I just done npm build and copied js/css to my Java project. It works fine as a standalone app. But my goal is to render the Vue app after click of th button on my existing page.

now the main.js contains this:

import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false

new Vue({
	render: h => h(App)
}).$mount('#chat_app')

my html is:

...
<div id="app"></div>
<input type="button" value="Chat"/>
<script src="assets/js/app.beb67329.js"></script>
<script src="assets/js/chunk-vendors.29eba92b.js"></script>

now the chat initializes automatically on the page load, how to make it render on a button click?

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

1 participant