-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
I'm submitting a ... (check one with "x")
[x] Bug report
Current behavior
When trying to compile my Angular 9 app with AOT, I'm getting the following error:
ERROR in Error during template compile of 'SharedModule'
Function calls are not supported in decorators but 'MetaModule' was called.
Unexpected value 'undefined' imported by the module 'SharedModule in /src/app/shared/shared.module.ts'
Can't export value MetaModule in /node_modules/@ngx-meta/core/meta.module.d.ts from SharedModule in /src/app/shared/shared.module.ts as it was neither declared nor imported!
Error during template compile of 'SharedModule'
Function calls are not supported in decorators but 'MetaModule' was called.
export const metaFactory = (): MetaStaticLoader =>
new MetaStaticLoader({
pageTitlePositioning: PageTitlePositioning.PrependPageTitle,
pageTitleSeparator: ' - ',
applicationName: 'XYZ',
defaults: {
title: 'XYZ',
description: 'xyz',
}
});
@NgModule({
...
imports: [
MetaModule.forRoot({
provide: MetaLoader,
useFactory: metaFactory
})
]
exports: [
...
MetaModule
]
});
When I remove this package from the modules, it is able to compile properly.
Expected/desired behavior
Able to compile with @ngx-meta/core with AOT
Environment
- Angular version: 9.1.0
MicaelMnl, bjornlarssonviggeby, constantinoschristoforou, jtammen, williamareynolds and 4 more
Metadata
Metadata
Assignees
Labels
No labels