08.02.2017 Views

vuejs

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A Flavor of Directives. 16<br />

1 <br />

2 <br />

3 Hello Vue<br />

4 <br />

5 <br />

6 <br />

7 You must send a message for help!<br />

8 You have sent a message!<br />

9 <br />

10 <br />

11 Send word to allies for help!<br />

12 <br />

13 <br />

14 {{$data | json}}<br />

15 <br />

16 <br />

17 <br />

18 <br />

19<br />

20 <br />

21 new Vue({<br />

22 el: '#app',<br />

23 data: {<br />

24 message: 'Our king is dead! Send help!'<br />

25 }<br />

26 })<br />

27 <br />

28 <br />

Using v-else with v-if.<br />

1 <br />

2 <br />

3 Hello Vue<br />

4 <br />

5 <br />

6 <br />

7 You must send a message for help!<br />

8 You have send a message!<br />

9 <br />

10 <br />

11 Send word to allies for help!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!