Closed ganySA closed 5 years ago
Same question here, did you ever figure this out?
No
On Tue, 04 Jun 2019 at 19:23, Don Waldo notifications@github.com wrote:
Same question here, did you ever figure this out?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DVLP/signalr-no-jquery/issues/44?email_source=notifications&email_token=AAYKTVTLGPSS6JMAWL2HXDLPY2QKJA5CNFSM4GDBKC2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW5I5KI#issuecomment-498765481, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYKTVVEUIXCGCTRRDAKMA3PY2QKJANCNFSM4GDBKC2A .
I think I did, generate your own proxies, don't use the ones on the endpoint.
import { hubConnection } from 'signalr-no-jquery';
const connection = hubConnection('/signalr', {});
const hubProxy = connection.createHubProxy('integrationStatusHub');
type ReportIntegrationStatusCallback = (message: string) => void;
export function connectSignalRIntegrationStatusHub(integrationCallback: ReportIntegrationStatusCallback) {
// set up event listeners for the hub proxy
hubProxy.on('reportStatusAsync', function (message) {
integrationCallback(message);
});
connection.start({ jsonp: true })
.done(function () { console.log('SignalR connected, connection ID=' + connection.id); })
.fail(function () { console.log('Could not connect'); });
}
How can i link my generated hub proxy?
Do i need to refactor all the jQuery out?
Thanks