直接接入vue.js的项目应用--hello word

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue入门</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="root">{{msg}}</div>

    <script>
        //创建vue对象
        new Vue({
            el: "#root",//挂载点,把页面中某个element交给vue接管
            data: {
                //vue实例的数据
                msg: "hellow word!"
            }
        });
    </script>
</body>
</html>

 

posted on 2018-07-31 15:48  怼_烎  阅读(423)  评论(0编辑  收藏  举报

导航