-
Notifications
You must be signed in to change notification settings - Fork 27k
Closed
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Current behavior
Write a custom validator per docs: https://angular.io/guide/form-validation and try to build with --prod flag for AOT compiler
Expected behavior
Be able to built with AOT without build error:
BUILD ERROR
: Error: /home/test/src/validators/generic.validator.ts:17:1: Error encountered in metadata generated for exported symbol 'GenericValidator':
/home/test/src/validators/generic.validator.ts:40:12: Metadata collected contains an error that will be reported at runtime: Lambda not supported.
{"__symbolic":"error","message":"Lambda not supported","line":39,"character":11}
Minimal reproduction of the problem with instructions
Download:
https://stackblitz.com/edit/angular-gitter-tsgzld
And built with npm i && ng build --prod
What is the motivation / use case for changing the behavior?
Following the instructions from the official docs triggers a build error.
https://angular.io/guide/aot-compiler
https://angular.io/guide/form-validation
Environment
Angular version: 5.2.11
For Tooling issues:
- Node version: v10.10.0
- Platform: Linux
Metadata
Metadata
Assignees
Labels
No labels