WebSocket, Server Sent Events and Router plugins #84
-
Which @ngneat/elf-* package(s) are relevant/releated to the feature request?No response DescriptionAre there plans to create websocket, server sent events and router plugins? Proposed solutionNo solution yet Alternatives consideredNo alternatives yet Do you want to create a pull request?Maybe |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi, Can you elaborate more, please? what is unique in websocket? Angular router plugin? |
Beta Was this translation helpful? Give feedback.
-
RouterWith router state we could store route/query params and with Store{
router: {
route: { userId: 1, conversationId: 3 },
query: { showDialog: false },
url: 'users/1'
},
user: {
entities: { 1: { id: 1, email: '...' } },
ids: [1]
}
} Usageimport { routerStore } from '@ngneat/elf-router';
@Component({
template: `{{ routerData$ | async }}`,
})
export class UserComponent {
routeData$ = routerStore.pipe(select(s => ({
userId: s.route?.userId,
showDialog: s.query?.showDialog,
})));
} WebSocket, EventSource (SSE)Need some time to think about the concept. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/ngneat/elf-ng-router-store thanks to @yackinn |
Beta Was this translation helpful? Give feedback.
https://github.com/ngneat/elf-ng-router-store thanks to @yackinn