Anyone out there with a complete example on how to use socket.io with Ionic 2?
I found a version for ionic 1 here, but nothing comparable for version 2.
there’s already questions asked about ionic 2 and socket.io you should search down the forum before posting anything about that.
@skoff How do you know that I did not do this? I find your answer disappointing. Let me tell you, why:
Search results for 'ionic 2 socket.io ' - Ionic Forum yields the following results
- Socket.io Ionic - #2 by bengtler – outdated:
- uses --ambient cl argument
- no full example that works (my problem: typings for socket.io-client seem not to work currently, maybe because I misunderstood something)
- The example pointed to at Creating a Real Time Chat Application with Ionic and Socket.io is outdated and uses JavaScript insated of Typescript
- How to use socket.io in ionic 2 – recommends to use strongly deprecated addition to index.html
- Import socket.io-client not working points to what I think will be the correct path, namely to use
typings install dt~socket.io-client --save --global
, but ALAS, no working example how to continue - Using socket-io with Ionic2 deals with a side topic wrt security, not my question
- Downloading Ionic Alpha CLI Issues has nothing to do with the question I have
- Best way to make a chat app? - #2 by delta98 indirectly points to Ionic SocketIO Chat which I believe is not the recommended way to set up an Ionic 2 app
- ngFor Not Updating - #16 by iignatov talks about using zones directly which I already learned should not be necessary now
- [DEMO] Ionic chat app - #16 by sonalikarade points to What’s App Chat Clone – An Ionic Framework ,Socket.io and Nodejs Full Hybrid App by thecodefactory which requires you to pay $20 for not knowing if the answer is useful. I already invested $100 into people promising me to explain ionic 2, but left me with outdated crap and now I refrain to spend more money. I currently only recommend this book
- Unrelated: this, this, this, this, this and this
- [DEMO] Ionic chat app - #16 by sonalikarade points to GitHub - matiastucci/socket-chat-client: 📲 Ionic Socket.IO chat client which uses javascript, not typescript
- IONIC Not receiving Socket data Javascript, not TypeScript
Then you see the end of the list and the statement:
No more results found.
Maybe I overlooked the needle in the haystack. I spent 4 hours yesterday searching Google with no success for a working example.
I just started with javascript, ECMA 6, TypeScript, Angular 2 and Ionic 2 and though I am an experienced C++ and C# programmer I am having a hard time to grok this way of doing things. Maybe one day we are all back to this programming language.
In the meantime I kindly ask again:
Could you or someone else please post a working Ionic 2 TypeScript demo for using socket.io? It should use components, of course …
i’m sorry but when I search for Socket.IO in ionic 2 category of this forum I can find this post:
From what I can see they managed to make it work.
Yes, I had answered a question just like the OP’s in that thread, where I shared a fully working example of socket.io in ionic2 and typescript.
Here’s the link to the example: http://github.com/beetz12/ionic2-web-chat
thanks a lot @beetz12
Many, many thanks. I still wonder why I did not obtain that search result.
PubNub Chat SDK Ionic2:slight_smile:
Pubnub SDK