Components Registration
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script src="vue.js" type="text/javascript" charset="utf-8"></script> </head> <body> <div id="app"> <button-counter></button-counter> <test></test> </div> <script type="text/javascript"> Vue.component('button-counter', { props: ['title'], data: function () { return {} }, template: '<div><h1>hi...</h1></div>', methods:{ } }) var vm = new Vue({ el : "#app", data : { }, methods:{ clicknow : function (e) { console.log(e); } }, components:{ test : { template:"<h2>h2...</h2>" } } }); </script> <style type="text/css"> </style> </body> </html>