Prerequisites
- What is your product version? V10.1.0
- What is your product type (Angular or MVC)? Angular
- What is product framework type (.net framework or .net core)? net50
Hi There,
I have some AppConsts set in the API project for various fieldlengths - are these exposed anywhere in the angular project to save duplication when validating input?
Kind Regards, AJ.
4 Answer(s)
-
0
Hi @ashjackson,
No, consts on the server side are not shared with clients. You can use AppConsts.ts in Angular or you can return consts using an AppService but we prefer defining them in Angular app.
-
0
Hi There, A further question to this point, how do the values from appconfig.json get assigned to their partners in AppConsts.ts? If I wanted to add my a new value to AppConsts which is defined in appcondig.json, can I simple add to both files, or is there another class which reads in and assigned the values?
Kind Regards, AJ.
-
0
Thankyou, this will be very useful.