Hello, In a strongly typed language like java or c#, i would use a HashMap but other typescript expert out there may have better opinion which I am also interested in.
Thai On Wed, Jan 22, 2020 at 7:23 AM Ronald Faircloth <[email protected]> wrote: > I have an MS SQL Server database. This database contains statistics for > users to fill out monthly. The site administrators can add and remove > fields they want so the form needs to be dynamic. I'm new to Angular and > from what I have seen through the Heroes tutorial and other explanations > there should be a class that defines your object. So, I should have a > class that is something like this: > > export class Stats{ > stat_field1: number; > stat_field2: number; > stat_field3: number; > stat_field4: number; > } > > Then in my component's TS file I will need to reference this object > definition as I create the object to pass back to the database. My > question is, if these fields are dynamic, how do I define this class? > > Thank you in advance, > > Ronnie > > -- > You received this message because you are subscribed to the Google Groups > "Angular and AngularJS discussion" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/angular/a3871c76-b55f-4cae-942d-e496fd568600%40googlegroups.com > <https://groups.google.com/d/msgid/angular/a3871c76-b55f-4cae-942d-e496fd568600%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Castor Technologies Inc 460 rue St-Catherine St Ouest, Suite 613 Montréal, Québec H3B-1A7 (514) 360-7208 o (514) 798-2044 f [email protected] www.castortech.com CONFIDENTIALITY NOTICE: The information contained in this e-mail is confidential and may be proprietary information intended only for the use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any viewing, dissemination, distribution, disclosure, copy or use of the information contained in this e-mail message is strictly prohibited. If you have received and/or are viewing this e-mail in error, please immediately notify the sender by reply e-mail, and delete it from your system without reading, forwarding, copying or saving in any manner. Thank you. AVIS DE CONFIDENTIALITE: L’information contenue dans ce message est confidentiel, peut être protégé par le secret professionnel et est réservé à l'usage exclusif du destinataire. Toute autre personne est par les présentes avisée qu'il lui est strictement interdit de diffuser, distribuer ou reproduire ce message. Si vous avez reçu cette communication par erreur, veuillez la détruire immédiatement et en aviser l'expéditeur. Merci. -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/CAJVRZt_x-dbfw4st3XqUs6Fy-oPrWny0Yv3dAz7tWYbmSJVrbw%40mail.gmail.com.
