Closed vanishree1 closed 7 years ago
my current api service for feathers is:
import { Injectable } from '@angular/core';
import * as io from "socket.io-client";
import * as feathers from 'feathers/client';
import * as socketio from 'feathers-socketio/client';
import * as hooks from 'feathers-hooks';
import * as authentication from 'feathers-authentication/client';
declare const window;
@Injectable()
export class ApiService {
public socket: io.socket;
public app: any;
private url: string = "http://127.0.0.1:3000";
constructor() {
this.socket = io(this.url);
this.app = feathers()
.configure(socketio(this.socket))
.configure(hooks())
.configure(authentication({ storage: window.localstorage}));
}
}
There is now a sample Angular chat implementation at https://github.com/j2L4e/feathers-chat-angular
I'm trying to implement feathers-client in angular-2 with the help of feathers doc.
1)export class SocketService extends Service, not sure where this Service is from.
2)this._rest = _restService.getService('messages'); this._socket = _socketService.getService('messages');
getService is not implement in feathers.service.ts
P.S : Kindly demonstrate with complete functional todo app using feathers-client in angular2.