Vue instruction of `v-text` and` v-html`

v-text:

Flicker problem is not loaded, it will cover the elements of the original content, but interpolation expression, will replace its placeholder, not the entire contents of the elements empty.

v-html:

Using v-html tag element can also be displayed on the element

    < Div > {{Msg2}} </ div > 
    < div V-text = "Msg2" > </ div > 
    < div V-HTML = "Msg2" > 1212112 </ div > 

< Script > 
    var VM =  new new Vue ( { 
      EL: ' #app ' , 
      Data: { 
        MSG: ' 123 ' , 
        Msg2: ' <h1 of> ha, is a big I H1, I am, am proud </ h1 of> ' ,
        mytitle: 'This is a title of their definition ' 
      }, 
      methods: { // This attribute defines the methods currently available methods all Vue Example 
        Show: function () { 
          Alert ( ' the Hello ' ) 
        } 
      } 
    })

 

Guess you like

Origin www.cnblogs.com/xiaowie/p/11572015.html