{
"id": 1,
"what": "He is designer using php & vuejs",
"who": "Muhaza",
"cars": [
{
"name": "Ford",
"models": [
"Fiesta",
"Focus",
"Mustang"
]
},
{
"name": "BMW",
"models": [
"320",
"X3",
"X5"
]
},
{
"name": "Fiat",
"models": [
"500",
"Panda"
]
}
]
}
Exploring Vue? So do I. I put all the research and documentation here for all of us to refer.
Showing posts with label json. Show all posts
Showing posts with label json. Show all posts
Thursday, March 7, 2019
Tuesday, March 5, 2019
VUE 3.0 : Parsing External Json
...
<template>
<div id="app">
<!-- <img alt="Vue logo" src="./assets/logo.png" /> -->
<div><Header menu="menu"/> |<Header menu="masakan"/> |<Header menu="thai"/></div>
<!-- <p>{{tasks.title}}</p> -->
<HelloWorld content="Welcome to Your Vue.js App" />
<HelloMuhaza content="Muhaza On Work"/>
<myComponent content="This part of component"/>
<!-- parsing from external api -->
<ul v-if="posts && posts.length">
<li v-for="post of posts" v-bind:key="post.id">
<p><strong>{{post.title}}</strong></p>
<p>{{post.body}}</p>
</li>
</ul>
</div>
</template>
<script>
import HelloWorld from "./components/HelloWorld.vue";
export default {
name: "app",
//axios start here
data () {
return {
posts: []
}
},
created() {
axios.get('http://jsonplaceholder.typicode.com/posts').then((response) => {
this.posts = response.data
})
.catch((e) => {
console.error(e)
})
},
components: {
HelloWorld,
}
};
</script>
<style>
</style>
Saturday, March 2, 2019
Sunday, February 24, 2019
Subscribe to:
Posts (Atom)
V-MODEL .NUMBER SOLVE 1+1=11
facing this problem? So do I. Vuejs already solve this problem by adding .number on v-model https://vuejs.org/v2/guide/forms.html#n...
-
vue cli 3 npm i -g @vue/cli create vue create my-vue-app > Follow instruction to build your app run npm run serve add a plugin ...