Hello friends,
I am trying to create a table with the data returned by the server, however I am getting the following message.
Value for ‘myvariavel’ is non-repeatable.
My http-client method is like this.
import { inject } from 'aurelia-framework';
import { HttpClient } from 'aurelia-http-client';
@inject(HttpClient)
export class ServicoProvider{
constructor(http) {
this.collection = [];
this.entity = null;
this.http = http;
this.http.configure(x => {
x.withBaseUrl('http://localhost:8000');
});
}
get() {
return this.http.get('/servicos')
.then(data => { return data.content; })
.catch(error => {
console.log('Deu muita merda...');
// console.log(error);
});
}
}