File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
angular/src/shared/helpers Expand file tree Collapse file tree 1 file changed +6
-2
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 = {
@@ -17,6 +16,11 @@ export class SignalRAspNetCoreHelper {
1716 } ;
1817
1918 const script = document . createElement ( 'script' ) ;
19+ if ( callback ) {
20+ script . onload = ( ) => {
21+ callback ( ) ;
22+ } ;
23+ }
2024 script . src = AppConsts . appBaseUrl + '/assets/abp/abp.signalr-client.js' ;
2125 document . head . appendChild ( script ) ;
2226 }
You can’t perform that action at this time.
0 commit comments