Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Muhammad Aref
    any help??
    Muhammad Aref
    I tried to use AMD (requireJS) to load angular-websocket file, but I get an error stating - Uncaught Error: Script error for "ws"
    I checked the source code of angular-websockets.js file, and seems the code tries to require['ws'] module
    I don't see any existence of 'ws' module. Any help would be appreciated here
    i just tried it and i didnt have any problems
    maybe use cdn?
    how can you open a connection with a different url?
    inside the controller
    also having trouble with unit testing with $websocketBackend. I can test the connect successfully, but I want to trigger the onOpen event handler so that I can test that functionality. how can I achieve a mocked successful websocket handshake using the mock library?
    Is Ok?

    Hi all!
    I am trying to make a small webapp, and was wondering what the best practice method was for getting initialization data when the socket makes the first connection? I currently have setup a .factoryto return a collection with a .send method. i,e

    .factory('WebSktData', function ($websocket) {
      <snip snip>
    var methods = {
                    collection: collection,
                     send: function (message) {
    return methods;

    What would be considered the correct way to pass a function to the onOpen and onError from the controller, and not directly in the factory?

    Jeremy Carlsten
    Anyone using this with typescript yet?

    I ask because I'm having issues with getting the typings setup. I've found a typings file for angular-websockets but when I try to compile my ts files I get the following error
    tsconfig.json generated: tsconfig.json

    typings/modules/angular-websocket/index.d.ts(23,22): error TS1110: Type expected.
    typings/modules/angular-websocket/index.d.ts(24,35): error TS1109: Expression expected.
    typings/modules/angular-websocket/index.d.ts(163,1): error TS1128: Declaration or statement expected.

    Hi there
    I'm looking to use angular-websocket but once I've install it and injecting it to my all app my unit test beforeEarch call are not... called, is someone have seen a similar issue?
    my bad, I just forget to add angular-websocket to karma imports
    sorry for the noise :D
    Ask, angular2-websocket support IPv6 access?
    Ask, angular2-websocket support IPv6 access?
    Saurabh Mishra
    Hi, can somebody give me pointers for using websocket with angular 4
    A general websocket question
    Is there any option to send data to client, without any request from client?
    yes use emit
    websockets is about events
    there are 4 events
    or you can use intervals
    Guys. Anyone here who can help me with adding a JWT Authorization header to the websocket connection string? There's a PR for it which I have transpiled but I dont know how to add it
    This is my current string which works on ws servers without needing JWT auth.
        var wsTransactions = $websocket('wss://frontend.smartloxs.io:8090/access/transactions', {
            reconnectIfNotNormalClose: false
    Claudio Pomo
    I'm using AngularWebSocket with angular-nvd3. I get a lot of error in console about Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
    How can I solve this?
    Is https://github.com/afrad/angular2-websocket the best alternate for using websockets in angular 5?
    I was using https://github.com/gdi2290/angular-websocket in Angular 1.x
    I`m using Angular universal and webpack compiler exactly like docs that angular published. But I faced many errors:
    ERROR Error: NotYetImplemented
    at Document.exports.nyi (webpack-internal:///./node_modules/domino/lib/utils.js:41:9)
    at CookieService.check (webpack-internal:///./node_modules/ngx-cookie-service/cookie-service/cookie.service.js:31:48)
    Could you please help me?
    Mateusz Mydlarz
    Hi guys, i try to enter angular-websocket documentation and i cant https://www.omniref.com/github/gdi2290/angular-websocket
    someone can help me?
    how i can say to specific channel?
    Mateusz Mydlarz
    ok, i made it
    var params = { channel: "AppearanceChannel", uuid: "" };
    let data = JSON.stringify({ command: "subscribe", identifier: JSON.stringify(params)});
    dataStream.send( data );
    Websocket or TCP or Push Notification - which is best to create stock mobile apps which updates with live stock updates. ???
    I have a websocket application deployed on google cloud platform and the websocket closes after 30 seconds, tried changing the timeout of backend service but it does not resolve the issue. Any clues pls ?
    Hello. I am trying to use angular-websocket in a spring boot application and failing to find how does the client subscribe to a certain path that the socket is replying on ? Thanks.
    Antoine Luckenson
    Hello guys, I'm trying stream a video over websocket connection does anyone have an idea how to do it please?
    Hey guys,
    Any one has good reference of using websocket with Angular 2