Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="well">
- <input type="search" v-model="MySearch" class="form-control" placeholder="Search"/>
- </div>
- <div class="row">
- <table class="table">
- <thead>
- <tr>
- <th>Nome</th>
- <th>Altura</th>
- <th>Peso</th>
- <th>Cor dos Olhos</th>
- <th>Genero</th>
- <th>Cor dos cabelos</th>
- </tr>
- </thead>
- <tbody>
- <tr v-for="bancodedado in bancodedados | filterBy MySearch ">
- <td>{{ bancodedado.name }}</td>
- <td>{{ bancodedado.height }}</td>
- <td>{{ bancodedado.mass }}</td>
- <td>{{ bancodedado.eye_color }}</td>
- <td>{{ bancodedado.gender }}</td>
- <td>{{ bancodedado.hair_color }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- new Vue({
- el: '#app',
- data: {
- bancodedados: [],
- MySearch:''
- },
- methods: {
- },
- created: function() {
- var self = this;
- self.$http.get('https://swapi.co/api/people/?format=json').then(function(response) {
- self.bancodedados = response.body.results;
- });
- }
- });
- </div>
- - invalid expression: v-for="bancodedado in bancodedados | filterBy MySearch "
- (found in <Root>)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement