Closed Anirog closed 4 years ago
Getting the following error after changing the 'edit_article.pug' file:
Cannot read property '_id' of null
My code is:
extends layout
block content h1 #{title} form(method='POST', action='/articles/edit/'+article._id)
label Title: input.form-control(name='title', type='text', value=article.title) #form-group label Author: input.form-control(name='author', type='text', value=article.author) #form-group label Body: textarea.form-control(name='body') article.body input.btn.btn-primary(type='submit',value='Submit')
Getting the following error after changing the 'edit_article.pug' file:
My code is:
extends layout
block content h1 #{title} form(method='POST', action='/articles/edit/'+article._id)
form-group