export default class ThingFactory {
constructor($http) {
this.$http = $http;
this.data = {
name: "Name",
age: 17
};
}
get() {
this.$http({
method: 'GET',
url: '/1'
}).then(function successCallback(response) {
console.log(response)
}, function errorCallback(response) {
console.log(response)
});
}
newThing() {
console.log('Getting a new Thing...');
return this.data;
}
}