Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails API + AngularJS + Websocket-Rails gem

My server is running the websocket-rails gem to handle websockets.

I'm having trouble using websocket-rails with a phonegap project that uses angular because I need to initialize the websocket-rails client in my Angular front end independent of the rails asset pipeline.

Is it possible to load the websocket-rails client separately into an angular project? Or can I use an angular socket directive to manange sockets with websocket-rails?

like image 756
ajbraus Avatar asked Apr 12 '14 21:04

ajbraus


1 Answers

I managed to get this working.

I translated all the coffeescripts into js with the coffescript CLI tool. Then I added those files to my project then called the methods in the controller per the websocket-rails docs.

like image 180
ajbraus Avatar answered Nov 16 '22 13:11

ajbraus