Reputation: 3068
Trying to utilize signalr in Ionic2.
Steps taken:
[email protected]
and [email protected]
with npm
. import * as $ from 'node_modules/jquery'; import 'node_modules/signalr';
$.hubConnection(..)
jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.
Upvotes: 1
Views: 548
Reputation: 61
I've found two options that have worked for me so far.
Option 1: You can add this block of code to the top of the jquery.signalR.js script file
var $ = require('jquery');
window.jQuery = $;
Option 2: You can download signar-no-jquery package. This package worked out of the box for me.
Goodluck
Upvotes: 1