Open yokujin opened 10 years ago
For me the 1.0.0 works fine. You have to use the amd dependency injected object as the ReconnectingWebSocket constructor. So if you define the requireJs dependency as:
'reconnecting-websocket': ['lib/reconnecting-websocket/reconnecting-websocket'],
and then wherever you need it use the name you used as alias:
(function(){
'use strict';
define('ngservices', ['angular', 'reconnecting-websocket'], function(angular, InjectedReconnectingWs){
...
// var ws = new ReconnectingWebSocket('ws://...') // WRONG
var ws = new InjectedReconnectingWs('ws://...') // RIGHT
When loaded via RequireJS I get the following error: ReconnectingWebSocket is not defined
When I commented out if branch which checks for define and define.amd it started work like a charm.