import { Injectable } from '@angular/core';
import * as feathers from 'feathers-client';
import * as superagent from 'superagent';
// const superagent = require('superagent');
// const feathers = require('feathers/client');
// const rest = require('feathers-rest/client');
// import * as rest from 'feathers-rest/client';
const HOST = 'http://localhost:3030'; // Your base server URL here
const rest = feathers.rest(HOST);
@Injectable()
export class ApiService {
private _app: any;
constructor() {
this._app = feathers() // Initialize feathers
.configure(rest.superagent(superagent)); // Fire up rest
}
public test() {
console.log('pepowopeoepeepw');
}
}
我尝试过很多东西,但一直都是错误
不确定是什么问题?