CaliStyle / ng-intercom

Angular 7+ Wrapper for Intercom.com
MIT License
54 stars 46 forks source link

Fix loading intercom script #60

Closed tiberiumihai closed 6 years ago

tiberiumihai commented 6 years ago

Summary of changes: Load Intercom JS directly, without relying on window.onload event. Inject Intercom JS using Render2 on boot, then do the bootstrap in the onLoad event of the injected script. Also, added snapdragon as a devDependency because otherwise the npm run build would fail.

Intended/example use case: Sometimes, when you refreshed or loaded/reloaded the page, the ng-intercom was not loaded due to window.onload being already triggered and intercom js not being injected. This should fix it.

Checklist:

Closes issue: #58

wbhob commented 6 years ago

Published beta 3