ng-intercom
Advanced tools
Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3
{ | ||
"name": "ng-intercom", | ||
"version": "1.0.0-alpha.2", | ||
"version": "1.0.0-alpha.3", | ||
"description": "An Intercom wrapper for Angular", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index", |
@@ -11,3 +11,8 @@ import { CommonModule } from '@angular/common'; | ||
import { IntercomConfig } from './types/intercom-config'; | ||
import { loadIntercom } from './util/load-intercom'; | ||
export function getIntercomService(config: IntercomConfig) { | ||
loadIntercom(config.app_id); | ||
return new Intercom(config); | ||
} | ||
@@ -39,3 +44,7 @@ @NgModule({ | ||
providers: [ | ||
{ provide: Intercom, useValue: config } | ||
{ | ||
provide: Intercom, | ||
useFactory: getIntercomService, | ||
deps: [config] | ||
} | ||
] | ||
@@ -42,0 +51,0 @@ } |
import { Injectable } from '@angular/core'; | ||
import { IntercomConfig } from '../types/intercom-config'; | ||
import { loadIntercom } from '../util/load-intercom'; | ||
@@ -15,3 +14,2 @@ /** | ||
) { | ||
loadIntercom(config.app_id); | ||
} | ||
@@ -18,0 +16,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
76791
1126
0