File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
angular/src/shared/helpers Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ import { AppConsts } from '@shared/AppConsts';
22import { UtilsService } from '@abp/utils/utils.service' ;
33
44export class SignalRAspNetCoreHelper {
5- static initSignalR ( ) : void {
6-
5+ static initSignalR ( callback ?: ( ) => void ) : void {
76 const encryptedAuthToken = new UtilsService ( ) . getCookieValue ( AppConsts . authorization . encrptedAuthTokenName ) ;
87
98 abp . signalr = {
@@ -16,6 +15,13 @@ export class SignalRAspNetCoreHelper {
1615 url : '/signalr'
1716 } ;
1817
19- jQuery . getScript ( AppConsts . appBaseUrl + '/assets/abp/abp.signalr-client.js' ) ;
18+ const script = document . createElement ( 'script' ) ;
19+ if ( callback ) {
20+ script . onload = ( ) => {
21+ callback ( ) ;
22+ } ;
23+ }
24+ script . src = AppConsts . appBaseUrl + '/assets/abp/abp.signalr-client.js' ;
25+ document . head . appendChild ( script ) ;
2026 }
2127}
You can’t perform that action at this time.
0 commit comments