lundi 5 août 2019

How can I combine Vue.js with Flask and pass argument to vue app?

I want to use Vue.js and Flask together, but not the whole website as a single page application. It's a blog system and the "/bolg" is a simple flask rendered blog list. "/blog/1" is a blog and is a vue single page application. All "/blog/" should use same vue spa but get different blog data.

@web_routes.route('/blog/<number>')
def blog():
    return render_template('app.html')

This code can render a webpack vue spa, but how can I pass blog index to the vue spa?




Aucun commentaire:

Enregistrer un commentaire