Vue 2.0 Hello World

by mmis1000

HTML

<script src="https://unpkg.com/vue"></script>

<div id="app">
  <p>{{ one }}</p>
  <p>{{ two }}</p>
</div>

CSS

::before {
  content: ".";
  height: 0;
  width: 0;
  color: transparent;
  display: inline-block;
  border-left: 1em solid red;
  border-top: 0.5em solid transparent;
  border-bottom: 0.5em solid transparent;
  vertical-align: baseline;
}

JavaScript

new Vue({
  el: '#app',
  data: {
    one: "",
    two: "TWOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
  },
  watch: {
  	one() {
    
    }
  },
  mounted() {    
      this.one = "One";
      //this.$nextTick(() => {
      	//this.message = 'I should be rendered';
       //});
      
      this.$nextTick(() => {
      	console.log('next')
      	this.one = "Two3"
      }, 0);
      
      //this.$nextTick(()=>{
      //this.two = "Two Two"
      //})
  }
})