Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. <div class="well">
  2. <input type="search" v-model="MySearch" class="form-control" placeholder="Search"/>
  3. </div>
  4.  
  5. <div class="row">
  6. <table class="table">
  7. <thead>
  8. <tr>
  9. <th>Nome</th>
  10. <th>Altura</th>
  11. <th>Peso</th>
  12. <th>Cor dos Olhos</th>
  13. <th>Genero</th>
  14. <th>Cor dos cabelos</th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. <tr v-for="bancodedado in bancodedados | filterBy MySearch ">
  19. <td>{{ bancodedado.name }}</td>
  20. <td>{{ bancodedado.height }}</td>
  21. <td>{{ bancodedado.mass }}</td>
  22. <td>{{ bancodedado.eye_color }}</td>
  23. <td>{{ bancodedado.gender }}</td>
  24. <td>{{ bancodedado.hair_color }}</td>
  25. </tr>
  26. </tbody>
  27. </table>
  28. </div>
  29.  
  30. new Vue({
  31. el: '#app',
  32. data: {
  33. bancodedados: [],
  34. MySearch:''
  35.  
  36. },
  37. methods: {
  38.  
  39. },
  40. created: function() {
  41. var self = this;
  42. self.$http.get('https://swapi.co/api/people/?format=json').then(function(response) {
  43. self.bancodedados = response.body.results;
  44. });
  45. }
  46. });
  47.  
  48. </div>
  49.  
  50. - invalid expression: v-for="bancodedado in bancodedados | filterBy MySearch "
  51.  
  52.  
  53. (found in <Root>)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement