Answer the question
In order to leave comments, you need to log in
What is the correct way to use multiline array or object literals in PUG template engine?
I can't create an array of objects in pug.
Either the error is `unexpected text "{"`, then it swears that spaces, tabs are not correct.
What are the ad rules?
Code (not working)
- let works = [
{
image : '/assets/images/works/paint-app.jpg',
text : Paint App,
link : '/projects/paint-app/index.html'
},
{
image : '/assets/images/works/color-generator.png',
text : 'Color Generator',
link : '/projects/color-generator/index.html'
},
{
image : '/assets/images/works/shulte-table.jpg',
text : 'Shulte Table',
link : '/projects/schulte-table/index.html'
},
{
image : '/assets/images/works/mental-trainers.png',
text : 'Mental Trainers',
link : 'https://ravshan01.gitlab.io'
}
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question