Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (32 sloc) 664 Bytes
<div id="app">
<h1>Tasks - show</h1>
<hr />
<h1>title : {{ item.title }}</h1>
<div v-text="item.content"></div>
</div>
<!-- -->
<script>
new Vue({
el: '#app',
created () {
var id = "<%= params_id %>";
this.getItem(id)
},
data: {
// tasks: [],
item : [],
title:'',
content:''
},
methods: {
getItem: function(id) {
axios.get("/api/tasks_show/" + id )
.then(res => {
var dat = res.data.docs
console.log( dat )
this.item = dat[0];
})
}
}
});
</script>
You can’t perform that action at this time.