Comments (18)
Okay, for some strange reason this now works, I've installed intercom again by using
npm install ng-intercom --save
and it works, however the chat icon is not showing up. I'm also using the code from the readme with one addition, which is user_id.
from ng-intercom.
The beta has been moved to the latest
tag, so that has the latest version. The code from the readme should not take a user_id
property in forRoot()
, so that may be your issue. Are you getting any console logs or errors?
from ng-intercom.
I've used user_id in my component when I wanted to display the intercom chat widget. I used the exact same code as the example in readme and initially i get Intercom.init is deprecated and will be removed in a future release. Please use Intercom.boot. After I replace to this.intercom.boot nothing happens. No errors in the console. not widget in the corner.
from ng-intercom.
To clarify: init
works, and boot
does not?
from ng-intercom.
No, nothing works, the only difference is that init throws console warning and boot doesn't show anything. In both cases, I don't see the chat widget in the corner. Just to test it, I've included a vanilla JS code in my index.html file in the header and the chat button shows up, so it's definitely an issue with the library.
from ng-intercom.
@newPrimitives init
is deprecated in favor of boot
to more closely match the IntercomJS API.
Can you please share a repo so I can see the issue?
from ng-intercom.
It's a private repo but here's how I integrate it in the component:
In the app.module.ts
...
import { IntercomModule } from 'ng-intercom';
@NgModule({
declarations: [
...
],
imports: [
....
IntercomModule.forRoot({ appId: "XXXX", updateOnRouterChange: true })
],
})
In the component:
....
import { Intercom } from 'ng-intercom';
...
export class ManageSpacesComponent implements OnInit {
constructor(private router: Router, private db: AngularFireDatabase, private auth: AuthService, public intercom: Intercom) {
}
ngOnInit() {
this.intercom.boot({
app_id: "XXXXX",
widget: {
"activator": "#intercom"
}
});
}
}
For the sake of testing I just want to see a blue chat bubble in the bottom right corner.
from ng-intercom.
just call this.intercom.boot
, and appId
should be app_id
from ng-intercom.
If that is the issue, let me know so I can fix the docs
from ng-intercom.
Unfortunately, not. My IntercomConfig looks like this:
export interface IntercomConfig {
appId: string;
updateOnRouterChange?: boolean;
apiToken?: string;
}
so app_id instead of appId throws an error. Calling just this.intercom.boot() doesn't help either.
from ng-intercom.
What version are you on?
from ng-intercom.
npm-list shows [email protected]
from ng-intercom.
Ok I’ll try to take a look tonight. Thanks for letting us know!
from ng-intercom.
Thank you, let me know the results, really appreciate it.
from ng-intercom.
I'm having the same issue. I've been investigating a bit:
- To display the default button, the correct
boot
config option is #IntercomDefaultWidget:
widget: {
activator: "#IntercomDefaultWidget"
}
IntercomModule.forRoot({appId: environment.intercom.app_id}),
seems to be the right syntaxappId
is only used to initialise Intercom JS code (cf. https://github.com/CaliStyle/angular2-intercom/blob/master/src/intercom/intercom.ts#L19)
The only issue that I encounter now is that I can't use alignment: 'left'
. It is working when using the vanilla JS, but not using the lib.
from ng-intercom.
I'm beginning to think it's something wrong with loading intercom asynchronously. I may need to dive in and investigate more. PRs would be accepted and greatly appreciated
from ng-intercom.
Update: I can reproduce this error. It seems to be a whitelist error, but it could be something entirely different. Open to suggestions and PRs.
from ng-intercom.
Alright folks, I just released beta.7. Thanks for your patience! I've verified that it is working locally.
As an aside, make sure that you have whitelisted localhost
so that Intercom knows requests are coming from you. I recommend using the TEST app so that you don't go into production with localhost whitelisted!
from ng-intercom.
Related Issues (20)
- Error starting tour HOT 1
- Intercom is not compatible with Angular 9 since .forRoot() got deprecated. HOT 3
- Angular 11 is incompatible HOT 3
- Not showing Intercom(icon widget) before login
- Upgrade to Angular v16 HOT 7
- Breaks under Angular 17 HOT 1
- appId being ignored in boot method HOT 3
- Function calls are not supported in decorators but 'IntercomModule' was called. - Regression in beta.6 HOT 38
- Support for angular 7.0 HOT 2
- Event metadata must be an object HOT 1
- Problems when building HOT 4
- Error with ng build --prod HOT 2
- Function calls are not supported in decorators but 'IntercomModule' was called. HOT 1
- Provider parse errors, Cannot instantiate cyclic dependency HOT 2
- Please ensure your intercomSettings object is formatted correctly: Missing App ID. HOT 8
- [fix] use window.intercomSettings to initiate app ID
- Lib broken in 8.0.0-rc.0 HOT 1
- Star tour function needed HOT 8
- Route performance problems using updateOnRouterChange HOT 5
- [8.0.1] Cannot find module 'ng-intercom' HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-intercom.