Skip to content

Instantly share code, notes, and snippets.

View mfaridzia's full-sized avatar
📒
storyteller

Muhammad Farid Zia mfaridzia

📒
storyteller
View GitHub Profile
<template>
<div id="app">
<center> <h1> Simple TodoList App </h1> </center>
<v-form class="form">
<v-text-field
label="Nama Tugas"
v-model="nama"
required
></v-text-field>
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
count: 0
},
getters: {
<template>
<div id="app">
<div class="counter"> {{ counter }} </div>
<button @click="increment" class="increment"> Tambah </button>
<button @click="decrement" class="decrement"> Kurangi </button>
</div>
</template>
<script>
export default {
<template>
<div id="app">
<router-view/>
</div>
</template>
<script>
export default {
name: 'App'
}
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store/index'
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
import Vue from 'vue'
import Router from 'vue-router'
import Counter from '@/components/Counter'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
// file: Value.vue
<template>
<div>
<button @click="addValue"> Add Value </button>
</div>
</template>
<script>
import { EventBus } from '@/eventBus.js'
// File: ChangeValue.vue
<template>
<div>
{{ datvalue }}
</div>
</template>
<script>
import { EventBus } from '@/eventBus.js'
// File: App.vue
<template>
<div id="app">
<Value/>
<ChangeValue/>
</div>
</template>
<script>
import Value from './components/Value.vue'
@mfaridzia
mfaridzia / front-end-guidelines.md
Created October 13, 2018 10:01 — forked from stowball/front-end-guidelines.md
Front-End Guidelines