Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

290
Views
¿Cómo realizar JSON.stringify en objetos con referencia ciruclar?

Me gustaría almacenar un objeto formgroup en la base de datos. No puedo encadenar este objeto debido a la dependencia circular. ¿Hay una solución para esto en angular?

formulario ={ nombre del curso: nuevo FormControl('', Validadores.requerido), contenido: nuevo FormControl('',Validadores.requerido), }

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

// your code const form = { coursename: new FormControl("", Validators.required), content: new FormControl("", Validators.required), }; // since new FormControl() create an object with circular reference, // so instead of taking the FormControl object, we can use FormControl.value // which return the actual data object with no circular reference // updated code courseNameControl = new FormControl("", Validators.required); contentControl = new FormControl("", Validators.required); const form = { coursename: courseNameControl.value, content: contentControl.value, } // now you can stringify the form const stringifyForm = JSON.stringify(form);
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!