Closed JohnnyTMD closed 5 years ago
I have installed the module following the instructions and i get this error ”TypeError: Cannot read property 'boot' of undefined”. Here is the code:
` public intercom: Intercom constructor() { }
ngOnInit() { this.intercom.boot({ /// <--- on this line is the error app_id: 'app-id', widget: { "activator": "#intercom" } }); }`
You should inject intercom provider into the component like this: constructor(private intercom: Intercom) {}
constructor(private intercom: Intercom) {}
@justinasit is right. Injectable providers must go in constructor, not outside of it.
I have installed the module following the instructions and i get this error ”TypeError: Cannot read property 'boot' of undefined”. Here is the code:
` public intercom: Intercom constructor() { }
ngOnInit() { this.intercom.boot({ /// <--- on this line is the error app_id: 'app-id', widget: { "activator": "#intercom" } }); }`