I have an array of material modules. I want to add NoopAnimationsModule on mobile devices. I want to to this because material inputs 'blinks' on ios when i close dialog. Code below works as i expect but i have an build:prod error. Any ideas how to solve this?
error:
ERROR in app/shared/modules/material-design/material-design.module.ts(73,3): Error during template compile of 'MaterialDesignModule'
Function calls are not supported in decorators but 'isMobile' was called.
code:
const materialModules = [
MatProgressBarModule,
MatCardModule,
isMobile() && NoopAnimationsModule
];
@NgModule({
imports: MaterialModules,
exports: MaterialModules
})