Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[Custom tag for Vue.JS component container]">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<div id="myApp">
  <h1 is="my-component" title="Привет, Vue.JS!"></h1>
</div>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.3/vue.js"></script>
  <script>
  window.app = new Vue({
    el: "#myApp",
    components: [
      Vue.component('my-component', {
        render: function(creatElement) {
          return creatElement(this.$vnode.data.tag, this.title);
        },
        props: {
          title: {
            type: String,
            default: 'Empty title',
          },
        },
      }),
    ],
  });
  </script>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
c01nd01rpro
0viewers