为什么我在vue使用template模板都不显示,html中的也是这样

为什么我在vue使用template模板都不显示,html中的也是这样

问题描述:

为什么我在vue使用template模板都不显示,html中的也是这样?

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>vue的使用</title>
        <script src="vue.js" type="text/javascript" charset="utf-8"></script>
    </head>
    <body>
        <div id="mount-point"></div>
        <script type="text/javascript">
         var Profile = Vue.extend({
           template: '<p>{{firstName}} {{lastName}} aka {{alias}}</p>',
           data: function () {
             return {
               firstName: 'Walter',
               lastName: 'White',
               alias: 'Heisenberg'
             }
           }
         })
         // 创建 Profile 实例,并挂载到一个元素上。
         new Profile().$mount('#mount-point')
        </script>
    </body>
</html>

引入vue.js路径对吗?看控制台有没有报错

img