Home > front end >  Vue initialization data written in the book <header> tag data is less than
Vue initialization data written in the book <header> tag data is less than

Time:09-15

Var=new vm Vue ({
El: "# app,"
Data: {
Name: 'zhao,
The message: 'news'
}

});
</script>

This code written script as usual on & lt; header> Tags, why pick up less than the data? Move him to & lt; body> The back can take to the inside of the data value,

CodePudding user response:

When the header to perform new Vue # app is undefined in the window. The onl oad ()==& gt; {
Var=new vm Vue ()
}
  • Related