Created
March 24, 2018 12:20
-
-
Save sean-nicholas/1c2c1ae61a90e18f6381b64dacf3f0ff to your computer and use it in GitHub Desktop.
feathers-reactive with Angular Universal - data 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Injectable() | |
| export class DataService { | |
| constructor( | |
| ) { | |
| const socket = io(this.BASE_URL) | |
| this.app | |
| .configure(socketio(socket)) | |
| .configure(rx({ idField: '_id' })) | |
| } | |
| BASE_URL = 'SOME_URL' | |
| app = feathers() as Application<Services> | |
| products() { | |
| return this.app.service('products').watch().find() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment