I am using angular2 my issue is that I am not able to call component method from javascript callback here is the code snippet.
declare var CORE_FACTORY:any;
// CORE_FACTORY Defined in javascript file which I've included in index.html and it's gets loded perfectly.
let coreApi = CORE_FACTORY.setupApiByDomain(Domain.QA);
coreApi.addUserEventListener(apiName, ApiEvent.ON_ANY_EVENT,this._userCallBack);
coreApi.callApi(request, this.afterCallApi);
afterCallApi(status, responceObject) {
this.postCreateInstrument(accountNumber); //Getting error right here.
}
public postCreateInstrument(accountNumber:string) {
alert('test');
}