Advertisement
Guest User

LEO JS

a guest
Feb 25th, 2020
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  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. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement