class: split-30 nopadding background-image: url(https://cloud.githubusercontent.com/assets/4231611/11863077/6d8ba8b4-a4c3-11e5-90c4-fe195d169a76.jpg) .column_t2.center[.vmiddle[ .fgtransparent[ #
] ]] .column_t2[.vmiddle.nopadding[ .shadelight[.boxtitle1[ # Vue.JS - Introduction ### [Eueung Mulyana](https://github.com/eueung) ### http://eueung.github.io/js/vuejs #### JS CodeLabs | [Attribution-ShareAlike CC BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) #### ]] ]] --- class: column_t1 middle .fonth2[ .tab1.fullwidth[ | Agenda | |:-------------:| | Quick Start | | Build an App with Vue.JS | ]] --- class: split-30 nopadding background-image: url(https://cloud.githubusercontent.com/assets/4231611/11863077/6d8ba8b4-a4c3-11e5-90c4-fe195d169a76.jpg) .column_t2.center[.vmiddle[ .fgtransparent[ #
] ]] .column_t2[.vmiddle.nopadding[ .shadelight[.boxtitle1[ # Vue.JS - Quick Start #### ]] ]] --- class: split-50 nopadding .column_t2[.vmiddle[ ```html
Vue.JS
*
* {{ message }}
``` ]] .column_t1[.vmiddle[ # Example #1 ]] --- class: split-50 nopadding .column_t1[.vmiddle[ # Example #2 #### .figstyle1[ ![](images/fig01.jpg) ] ]] .column_t2[.vmiddle[ ```html
Vue.JS
{{ message }}
*
``` ]] --- class: split-50 nopadding .column_t2[.vmiddle[ ```html
Vue.JS
*
* {{ todo.text }}
``` ]] .column_t1[.vmiddle[ # Example #3 #### .figstyle1[ ![](images/fig02.jpg) ] ]] --- class: split-50 nopadding .column_t1[.vmiddle[ # Example #4 #### .figstyle1[ ![](images/fig03.jpg) ] ]] .column_t2[.vmiddle[ ```html
Vue.JS
{{ message }}
*
Reverse Message
``` ]] --- class: split-50 nopadding .column_t2[.vmiddle[ ```html
Vue.JS
*
*
*
{{ todo.text }}
*
X
``` ]] .column_t1[.vmiddle[ # Example #5 #### .figstyle1[ ![](images/fig04.jpg) ] ]] --- class: split-30 nopadding background-image: url(https://cloud.githubusercontent.com/assets/4231611/11863077/6d8ba8b4-a4c3-11e5-90c4-fe195d169a76.jpg) .column_t2.center[.vmiddle[ .fgtransparent[ #
] ]] .column_t2[.vmiddle.nopadding[ .shadelight[.boxtitle1[ # Build an App with Vue.JS ## [scotch.io](https://scotch.io/tutorials/build-an-app-with-vue-js-a-lightweight-alternative-to-angularjs) ]] ]] --- class: split-50 nopadding .column_t2[.vmiddle[ ### Case #1 ```html
Vue
Vue Events Bulletin Board
... ``` ]] .column_t1[.vmiddle[ ```html
Add an Event
*
*
*
*
Submit
*
{{ event.name }}
*
{{ event.date }}
*
{{ event.description }}
*
Delete
``` .center[vue-schotchio-1.html] ]] --- class: split-50 nopadding .column_t1[.vmiddle[ ### Case #1 ``` new Vue({ el: '#events', data: { * event: { name: '', description: '', date: '' }, * events: [] }, * ready: function() { * this.fetchEvents(); }, methods: { ... } }); ``` ]] .column_t2[.vmiddle[ ``` methods: { * fetchEvents: function() { var events = [ { id: 1, name: 'TIFF', description: 'Toronto International Film Festival', date: '2015-09-10' }, { id: 2, name: 'The Martian Premiere', description: 'The Martian comes to theatres.', date: '2015-10-02' }, { id: 3, name: 'SXSW', description: 'Music, film and interactive festival in Austin, TX.', date: '2016-03-11' } ]; this.$set('events', events); console.log(JSON.stringify(events)); }, * addEvent: function() { if(this.event.name) { this.events.push(this.event); this.event = { name: '', description: '', date: '' }; } }, * deleteEvent: function(index) { if(confirm("Are you sure you want to delete this event?")) { this.events.$remove(index); } } } ``` .center[vue-scotchio-1.js] ]] --- class: column_t1 middle center .figstyle1[ ![](images/fig05.jpg) ] ## Case #1 --- class: split-50 nopadding .column_t2[.vmiddle[ ## Case #2 ```html