Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<body>
  <div id='app'>
    <h1>{{ bar }}</h1>
    
    <hello :greeting='bar'></hello>
  </div>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.16/vue.js"></script>
  <script>
    Vue.component('hello', {
      template: 'From hello tag: {{ greeting }}',
      props: ['greeting'],
      ready: function() {
        alert(this.greeting);
      }
    });
    new Vue({
        el: '#app',
        ready: function() {
            this.$set('bar', 'baz');
        }
    });
  </script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers