{"id":398,"date":"2017-02-16T14:07:00","date_gmt":"2017-02-16T06:07:00","guid":{"rendered":"http:\/\/www.qdabc.cn\/?p=398"},"modified":"2017-02-17T17:28:11","modified_gmt":"2017-02-17T09:28:11","slug":"vue-js%e5%ad%a6%e4%b9%a0%e6%80%bb%e7%bb%93%e5%8f%8a%e4%b8%8eangular%e7%9a%84%e5%8c%ba%e5%88%ab","status":"publish","type":"post","link":"http:\/\/www.qdabc.cn\/?p=398","title":{"rendered":"vue.js\u5b66\u4e60\u603b\u7ed3\u53ca\u4e0eAngular\u7684\u533a\u522b"},"content":{"rendered":"<h3 id=\"vue\u548cangular\u7684\u533a\u522b\">Vue\u548cAngular\u7684\u533a\u522b<\/h3>\n<h4 id=\"vue\"><a name=\"t1\"><\/a>vue\uff1a<\/h4>\n<ul>\n<li>\u7b80\u5355\u6613\u5b66<\/li>\n<li>\u6307\u4ee4\u4ee5v-xxx\u5f00\u5934<\/li>\n<li>\u4e00\u7bc7HTML\u4ee3\u7801\u914d\u5408\u4e0ason\uff0c\u5728new\u51fa\u6765Vue\u5b9e\u4f8b<\/li>\n<li>\u4e2a\u4eba\u7ef4\u62a4\u9879\u76ee<\/li>\n<li>\u9002\u5408\uff1a\u79fb\u52a8\u7aef\u9879\u76ee\uff0c\u5c0f\u5de7<\/li>\n<li>vue\u7684\u53d1\u5c55\u52bf\u5934\u5f88\u731b\uff0cgithub\u4e0astart\u6570\u91cf\u5df2\u7ecf\u8d85\u8fc7angular<\/li>\n<\/ul>\n<h4 id=\"angular\"><a name=\"t2\"><\/a>angular\uff1a<\/h4>\n<ul>\n<li>\u4e0a\u624b\u8f83\u96be<\/li>\n<li>\u6307\u4ee4\u4ee5ng-xxx\u5f00\u5934<\/li>\n<li>\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u90fd\u6302\u5230$scope\u8eab\u4e0a<\/li>\n<li>angular\u7531Google\u7ef4\u62a4<\/li>\n<li>\u9002\u5408\uff1apc\u9879\u76ee<br \/>\n<hr \/>\n<\/li>\n<\/ul>\n<p>vue\u7b80\u5355\u5b9e\u4f8b\uff1a<\/p>\n<pre class=\"prettyprint\"><code class=\"hljs handlebars has-numbering\"><span class=\"xml\">    <span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">script<\/span> <span class=\"hljs-attribute\">src<\/span>=<span class=\"hljs-value\">\"vue.js\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-title\">script<\/span>&gt;<\/span>\r\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">script<\/span>&gt;<\/span><span class=\"javascript\">\r\n        window.onload=<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span><span class=\"hljs-params\">()<\/span>{<\/span>\r\n            <span class=\"hljs-keyword\">var<\/span> vm=<span class=\"hljs-keyword\">new<\/span> Vue({\r\n                el:#box;  <span class=\"hljs-comment\">\/\/el \u4ee3\u7801element<\/span>\r\n                data:{\r\n                msg:<span class=\"hljs-string\">\"welcome to vuejs\"<\/span>\r\n                }\r\n            });\r\n        };\r\n    <\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-title\">script<\/span>&gt;<\/span>\r\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">body<\/span>&gt;<\/span>\r\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">div<\/span> <span class=\"hljs-attribute\">id<\/span>=<span class=\"hljs-value\">\"box\"<\/span>&gt;<\/span>\r\n            <\/span><span class=\"hljs-expression\">{{<span class=\"hljs-variable\">msg<\/span>}}<\/span><span class=\"xml\">\r\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-title\">div<\/span>&gt;<\/span><\/span><\/code><\/pre>\n<p>\u597d\u4e86\uff0c\u4e00\u6bb5\u57fa\u672c\u7684Vue\u4ee3\u7801\u5c31\u5c55\u793a\u51fa\u6765\u4e86\u3002<\/p>\n<hr \/>\n<p>vue\u4e2d\u5e38\u7528\u7684\u6307\u4ee4\uff1a<br \/>\n\u6307\u4ee4\uff1a\u6269\u5c55html\u6807\u7b7e\u529f\u80fd\u3001\u5c5e\u6027<br \/>\n\u4f8b\u5982angular\u91cc\u7684ng-model , ng-controller\u7b49\u90fd\u4e0d\u662fHTML\u6807\u7b7e\u7684\u5c5e\u6027\u3002<br \/>\n\u800c\u5728Vue\u4e2d\u4ee5v\u5f00\u5934\uff1a<br \/>\nv-model \u4e00\u822c\u8868\u5355\u5143\u7d20(input) \u53cc\u5411\u6570\u636e\u7ed1\u5b9a<\/p>\n<p class=\"post-copyright\">\u6b22\u8fce\u5206\u4eab\u672c\u6587\uff0c\u8f6c\u8f7d\u8bf7\u4fdd\u7559\u51fa\u5904\uff1a<a href=\"http:\/\/www.qdabc.cn\">\u524d\u7aefABC<\/a> &raquo; <a href=\"http:\/\/www.qdabc.cn\/?p=398\">vue.js\u5b66\u4e60\u603b\u7ed3\u53ca\u4e0eAngular\u7684\u533a\u522b<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Vue\u548cAngular\u7684\u533a\u522b vue\uff1a \u7b80\u5355\u6613\u5b66 \u6307\u4ee4\u4ee5v-xxx\u5f00\u5934 \u4e00\u7bc7HTML\u4ee3\u7801\u914d\u5408\u4e0ason\uff0c\u5728new\u51fa\u6765Vue\u5b9e\u4f8b \u4e2a\u4eba\u7ef4\u62a4\u9879\u76ee \u9002\u5408\uff1a\u79fb\u52a8\u7aef\u9879\u76ee\uff0c\u5c0f\u5de7 vue\u7684\u53d1\u5c55\u52bf\u5934\u5f88\u731b\uff0cgithub\u4e0a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":322,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[53,9,26],"_links":{"self":[{"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/posts\/398"}],"collection":[{"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=398"}],"version-history":[{"count":1,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/posts\/398\/revisions"}],"predecessor-version":[{"id":399,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/posts\/398\/revisions\/399"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/media\/322"}],"wp:attachment":[{"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=398"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}