Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // fetching datas
- methods: {
- getDataAgents : function(){
- let items = this
- let url = 'http://localhost:3000/stokiest'
- axios.get(url)
- .then(function(res){
- items.agents = res.data
- console.log(res.data)
- })
- .catch(function(err) {
- console.log(err)
- })
- }
- },
- getByid : function(id){
- let item = this;
- let url = 'http://localhost:3000/stokiest/' + id
- axios.get(url)
- then(function(res) {
- console.log(res)
- })
- }
- };
- component
- <v-btn color="success" v-on:click="getByid">Get data Agent</v-btn>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement