ngx-typesafe-forms icon indicating copy to clipboard operation
ngx-typesafe-forms copied to clipboard

Compatibility with Angular 10

Open jedmundo opened this issue 4 years ago • 5 comments

🐞 bug report

Affected Package

Not sure about the affected package. It worked fine with Angular 9

Is this a regression?

Yes

Description

In our Angular app we use this library that adds a simple wrapper around Forms in order to add some typings.

It worked fine until Angular 9, now it's failing during runtime with:

TypeError: Class constructor FormControl cannot be invoked without 'new'

ERROR Error: Uncaught (in promise): TypeError: Class constructor FormControl cannot be invoked without 'new' TypeError: Class constructor FormControl cannot be invoked without 'new' at new FormControl (ngx-typesafe-forms.js:583) at new LoginComponent (login.component.ts:13)

🔬 Minimal Reproduction

We are working on it but weren't able to create a minimal reproduction yet.

🔥 Exception or Error


TypeError: Class constructor FormControl cannot be invoked without 'new'

🌍 Your Environment

Angular Version:


Angular CLI: 10.0.0
Node: 12.18.1
OS: darwin x64
 
Angular: 10.0.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
 
Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.8
@angular-devkit/build-angular     0.1000.0
@angular-devkit/build-optimizer   0.901.9
@angular-devkit/build-webpack     0.901.9
@angular-devkit/core              9.1.8
@angular-devkit/schematics        9.1.8
@angular/cdk                      10.0.0
@angular/cli                      10.0.0
@angular/material                 10.0.0
@angular/pwa                      0.901.8
@ngtools/webpack                  9.1.9
@schematics/angular               9.1.8
@schematics/update                0.1000.0
rxjs                              6.5.5
typescript                        3.9.5
webpack                           4.42.0
 

Anything else relevant?

Worked fine with Angular 9

Good job with the library btw, we use it in our project but we wanted to upgrade to angular 10 but we get this error during runtime:

jedmundo avatar Jun 26 '20 14:06 jedmundo

confirmed

FrancescoBorzi avatar Jun 29 '20 10:06 FrancescoBorzi

Sorry, I didn't do a lot of frontend over the past months, so I kind of forgot to update the dependencies. I just released 1.1.1 which should be compatible with Angular 10. Can you verify?

dirkluijk avatar Aug 24 '20 09:08 dirkluijk

I have the same error on Angular 8 when I extend my own class from typesafe FormGroup. And only in prod mode.

It is not appears if "target": "es2015",

xuxicheta avatar Oct 06 '20 20:10 xuxicheta

@dirkluijk thanks, it's working with Angular 10 now. This issue can be closed

FrancescoBorzi avatar Nov 24 '20 12:11 FrancescoBorzi

has the project been abandoned?

FrancescoBorzi avatar May 18 '21 14:05 FrancescoBorzi