Solace in Angular
boon
Member Posts: 3 ✭
I would like to integrate the solace client into our application written in angular. I encounter issue when initialized the SolclientFactoryProperties by calling "new solace.SolclientFactoryProperties()" in angular type script.
Please advise it, the error that I encountered is as follow:
1:56:34 PM [vite] Internal server error: Cannot read properties of undefined (reading 'indexOf')
at Object.1124 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:366297)
at s (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:502858)
at Object.3147 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:359726)
at s (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:502858)
at Object.3762 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:115724)
at s (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:502858)
at Object.9691 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:117428)
at s (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:502858)
at Object.6780 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:113054)
at s2 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:502858)
Please advise it, the error that I encountered is as follow:
1:56:34 PM [vite] Internal server error: Cannot read properties of undefined (reading 'indexOf')
at Object.1124 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:366297)
at s (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:502858)
at Object.3147 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:359726)
at s (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:502858)
at Object.3762 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:115724)
at s (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:502858)
at Object.9691 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:117428)
at s (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:502858)
at Object.6780 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:113054)
at s2 (D:\Projects\Entori\ivod_dashboard\node_modules\solclientjs\lib\solclientjs.js:2:502858)
0
Comments
-
How is
solace
declared?0 -
import { Injectable } from '@angular/core';
import solace from 'solclientjs';
@Injectable({
providedIn: 'root'
})
export class SolaceClientService {
private factoryPros: any;
private session:any;
constructor() {
this.InitSolaceFactory();
}
private InitSolaceFactory():void{
var factoryPros= new solace.SolclientFactoryProperties();
//this.factoryPros.profile= solace.SolclientFactoryProfiles.version10;
//solace.SolclientFactory.init(this.factoryPros);
}
public connect(url:string, uid:string, pwd:string, vpn:string ){
// this.session = solace.SolclientFactory.createSession({
// url:url,
// vpnName:vpn,
// userName:uid,
// password:pwd
// });
// this.session.connect();
}
}
this is the script0