Open its-dibo opened 4 years ago
The forRoot()
function is not compatible with 8.3 and up. It needs to be a pure function that contains only a return statement.
Please see this comment for instructions on how to fix it:
https://github.com/angular/angular/issues/23609#issuecomment-561615821
The
forRoot()
function is not compatible with 8.3 and up. It needs to be a pure function that contains only a return statement.Please see this comment for instructions on how to fix it:
I read your comment, but how can I fix this issue in my project, I'm not the developer of ngx-formly-material-file, so I cannot make any modification in forRoot().
@codemile
@eng-dibo
You can try to manually provide the configuration in your module, and then import FileTypeModule
normally without calling forRoot()
.
If you look at the source code for the module, then you can see how it is providing FILE_TYPE_CONFIG
and so you can just handle this provider yourself.
@NgModule({
import: [FileTypeModule],
providers: [
{
provide: FILE_TYPE_CONFIG, useValue: {
// your config settings here
}
}
]
})
See here as reference:
following the instructions in readme exactly, but geeting an error: Function calls are not supported in decorators but 'FileTypeModule' was called.
references: https://stackoverflow.com/a/59823278/12577650