CaliStyle / ng-intercom

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

Error with ng build --prod #81

Closed Jatulito closed 5 years ago

Jatulito commented 5 years ago

When I try to build prod I get: ERROR in Error during template compile of 'AppModule' Function calls are not supported in decorators but 'IntercomModule' was called.

Versions:

Angular CLI: 7.0.6 Node: 8.11.3 Angular: 6.0.2 NPM: 5.6.0 ng-intercom: "^7.0.0-beta.0"

app.module.ts:

import { IntercomModule } from 'ng-intercom'; @NgModule({ imports: [ CommonModule, BrowserAnimationsModule, FormsModule, RouterModule.forRoot(AppRoutes), HttpModule, HttpClientModule, MaterialModule, MatNativeDateModule, SidebarModule, NavbarModule, FooterModule, FixedpluginModule, BrowserModule, ReactiveFormsModule, NgbModule, AgmCoreModule.forRoot({ apiKey: environment.googleMapKey }), IntercomModule.forRoot({ appId: environment.intercom, // from your Intercom config updateOnRouterChange: false // will automatically run update on router event changes. Default: false })
],

app.component.ts: import { Intercom } from 'ng-intercom';

constructor( private router: Router, public intercom: Intercom, private storeService: StoreService ) { } ngOnInit() { this.intercom.boot({
app_id: environment.intercom,
name: this.storeService.userName, user_id: this.storeService.userId, widget: { "activator": "#intercom" } }); }

Please help

wbhob commented 5 years ago

We are aware of this issue and lack the resources to fix it. PRs are welcome.

wbhob commented 5 years ago

Duplicate of #74.