Questions tagged [hbs]
83 questions
1
vote
1 answer
Json parse is not rendering data in the front end using Node.js & hbs
Server side:
app.get("/basket", (req, res) => {
fs.readFile("products.json", (err, data) => {
if (err) {
res.status(500).end()
} else {
res.render("basket", {products: JSON.parse(data)})
}
})
})
JSON:
{
"product_one": [
{
"name":…
user13765992
1
vote
2 answers
When my nodejs app is tring to connect with SQL Server, nothing is showing on console, even if there is no error
Below code is belongs to index.js file.
When I go to the link "localhost:300/admins/" according to the code it should connect with SQL Server and get back the result on console.
My Microsoft SQL Server Management Studio 2012 is running well and from…

Sidhartha Bhowmik
- 31
- 4
1
vote
3 answers
hide element if express is returning empty values
I'm creating app on nodejs and express. I'm getting json data from endpoint and rendering it on page according to values that I'm getting.
Problem is that, If I get null or undefined value from json data, how will I hide the whole element.
here's my…

Bilal Ahmad
- 75
- 1
- 7
0
votes
1 answer
I can't understand {{{ body }}} in Handlebars
It's translated, I'm not fluent in English yet, maybe it's not exact in some parts, well my question is, why the
{{{ body }}}
in an hbs file (example: 'main.hbs') and how? I know what is going to include me in this file ('main.hbs')?
I leave you…
0
votes
0 answers
Formatting Gmail messages fetched using the Google API in Node.js
I am using the Google API library in Node.js to fetch emails from Gmail. The code snippet below demonstrates how I retrieve and extract data from the fetched message:
const gmail = google.gmail({ version: "v1", auth: oAuth2Client });
const messageId…

Suliman Khan
- 51
- 5
0
votes
1 answer
How to implement dynamic filtering in Ember.js dropdowns?
I'm working on an Ember.js application and I need to implement two dropdowns where the options in the second dropdown are filtered based on the selected value in the first dropdown. I have the following requirements:
The second dropdown should fetch…

Yash Sharma
- 3
- 3
0
votes
0 answers
How can i used Heysender API for create domain?
const apiEndpoint = 'https://app.heysender.com/api/domains';
const apiKey = '************';
const apiSecret = '****************';
const authString = `${apiKey}:${apiSecret}`;
const base64AuthString =…
0
votes
2 answers
set variable in hbs template using ember.js
I have an array of data and I need to iterate over it in my hbs template:
{{#each-in myArray.[0] as |key value|}}
{{value}}
{{/each-in}}
{{#each-in myArray.[1] as |key value|}}
{{value}}
{{/each-in}}
How do I…

user1654719847
- 11
- 1
0
votes
0 answers
get all data from mongoDB, express js, on hbs
so i got problem where the data isn't showing, i am using node js with express library, and hbs library, i tried to showing the data from productCollection,idk how this is not working
here's my code, please help
index.js
app.get("/product", async…

Fatah Khair
- 3
- 5
0
votes
0 answers
I am trying to get value of document location from hbs file and post value to mongodb, but doesn't seems to be working
I have a location.hbs file where i have my script to get document.location and i am trying to pass document.location value to server.js file where i have done my express configurations. I want to post location details to my mongoDB.
code of my…
0
votes
0 answers
How can i send a post request from my js file into my routes file to display on to my hbs file?
I want to send a post to get data from mysql and display it to my thing, but it is not sending any post requests.
This is what my file looks like:
this is the place were I am sending the post request
podItems.forEach(item => {
…

harry vu
- 1
- 2
0
votes
0 answers
the connection between route folder and public in nodejs and hbs
i am trying to get data from MYSQL table and i am using nodejs hbs in my routes/index.js i wrote:
routes.get('/users', (req, res) => {
const query = 'SELECT * FROM users';
connection.query(query, (error, results) => {
if (error) {
…

qarn.ooz
- 29
- 1
- 7
0
votes
0 answers
How do i set ghost theme routes.yaml filter?
I want to apply multiple filters.
However, because of the preceding code, the code below seems to have no data to filter.
for example,
routes:
collections:
/tag/blog/en/:
permalink: /{slug}/en/
template: index
filter:…

jihwan
- 57
- 1
- 5
0
votes
1 answer
How to create custom design for AEM Communities
I have created a community website using AEM Communities. While creating the site, I can see some bootstrap designs and a we retail design. Now I would like to create my own template which uses the client libs that I have so I can use my components…

Happy Coder
- 4,255
- 13
- 75
- 152
0
votes
1 answer
Emails with links goes to junk folder in outlook
I am using nodemailer and handlebars templates in nest.js for mailing.
Everything works fine with gmail. But for outlook, mails are getting received in 'Junk' folder.
Mailer.module.ts:
MailerModule.forRootAsync({
imports: [ConfigModule],
…

Code The World
- 141
- 9