What div to put the #app ID in my blade template.

Posted 1 month ago by thelostpixel

Hi Everyone

Probably one of the simplest questions on this forum and a bit embarrased to ask. I am learning how to use Vue in Laravel and I am stuck on step 1.

What DIV should I add the ID #app to? Referred to in my app.js file:

const app = new Vue({
    el: '#app',

Should I wrap my entire blade template in a div#app (After opening body and before closing body) or should I just add it in the area I require Vue? (Im thinking first option as I may add Vue components in various places in various blade files)

Thanks in advance.


Please sign in or create an account to participate in this conversation.