SHARE
TWEET

LEO JS

a guest Feb 25th, 2020 109 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. const app = new Vue({
  3.   el: '#app',
  4.   data : {
  5.     posts : []
  6.   },
  7.   created() {
  8.     fetch('https://jsonplaceholder.typicode.com/posts')
  9.     .then(response => response.json())
  10.     .then(json => {
  11.       this.posts = json  
  12.     })
  13.    
  14.   }
  15. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top