-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular: Error in Console in User Management List view and not rendered date values #24793
Comments
JHipster has completed the sample check This check uses |
The steps looks a bit odd. Since the reproduction sample uses generator-jhipster/generators/angular/templates/src/main/webapp/app/app.component.ts.ejs Line 27 in 985f62c
generator-jhipster/generators/angular/templates/src/main/webapp/app/app.config.ts.ejs Line 67 in 985f62c
|
The ANGULAR_ID may be missing the country like |
Indeed odd, but just to be extra sure (as I have plenty of tests projects lying around and I wasn't 100% anymore :P), I regenerated another project with the exact same config (clicking through the questions in the wizard where German is automatically suggested as default, as this is my local Locale I guess) and then I received this kind of app.component.ts Interestingly, only the generated import in app.component.ts is wrong:
the value in the generated app.config.ts looks alright:
|
Fixed by #24630 |
Overview of the issue
When viewing the List view of User Management in a freshly generated application (where there is a Created / Modified date), we do get an error in console:
ERROR Error: NG02100: InvalidPipeArgument: 'NG0701: Missing locale data for the locale "de".' for pipe 'DatePipe'
at invalidPipeArgumentError (common.mjs:4021:12)
at DatePipe.transform (common.mjs:4485:19)
at pureFunction2Internal (core.mjs:27550:65)
at Module.ɵɵpipeBind2 (core.mjs:27771:9)
at UserManagementComponent_Conditional_31_Conditional_69_For_4_Template (user-management.component.html:80:21)
at executeTemplate (core.mjs:12158:9)
at refreshView (core.mjs:13390:13)
at detectChangesInView (core.mjs:13615:9)
at detectChangesInViewIfAttached (core.mjs:13578:5)
at detectChangesInEmbeddedViews (core.mjs:13535:13)
And no date values are being shown.
Motivation for or Use Case
Should not produce errors in console in a freshly generated application.
Reproduce the error
Related issues
Suggest a Fix
We found out, that when we add our additional "de" Locale to app.components initialization like the following, it does work, i.e. error goes away and date rendering works. I do wonder, if this is the right approach? (and therefore may be put into a Pull Request here)
...
JHipster Version(s)
8.1.0
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
Environment and Tools
openjdk version "17.0.7" 2023-04-18 LTS
OpenJDK Runtime Environment (Red_Hat-17.0.7.0+7-1) (build 17.0.7+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.7.0+7-1) (build 17.0.7+7-LTS, mixed mode, sharing)
git version 2.43.0.windows.1
node: v18.19.0
npm: 10.2.3
Docker version 24.0.2-rd, build e63f5fa
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Browsers and Operating System
Windows 10
The text was updated successfully, but these errors were encountered: