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

140
Views
connect-flash muestra [ ] en lugar de un mensaje (express)
 ... newArticle.save((err,newArticle)=>{ if(err){ req.flash('error','Sorry , an error has occured. Thamk you try again later') //when i use console.log(req.flash('error')) it shows normally in the terminal return res.redirect('/AddArticle') }else{ req.flash('success','Thank you , your article has been added') //when i use console.log(req.flash('success')) it shows normally in the terminal return res.redirect('/AddArticle') } }) }

esta es la función de ruta:

 router.post('/AddFormArticle',control.FormAddArticle)

esta es la función de control FormAddArticle que utilicé para mostrar el mensaje flash y la página:

 exports.FormAddArticle = (req,res)=>{ res.render('FormArticle',{title : "Ajouter un Article" , success : req.flash('success') , error : req.flash('error') })
about 4 years ago · Juan Pablo Isaza
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!