Ejs in hbs, how doing?

Ejs in hbs, how doing?
0.0 0

#1

in ejs i have this
<% logUser && post.author.id.eqals(logUser._id) %>

how can i write this in HBS?

the problem is with post.author.id.equals(logUser._id)

says Expect a id get a invalid


#2

Usually, Handlebars gets passed an object that then each of the properties in that object are exposed. So, you’d be doing something like

myTemplate(logUser);

Then, inside of myTemplate, you’d refer to each of logUser's properties just like variables.

/* In myTemplate */
post.author.id.equals(_id);

Tough to say exactly without more details on your project.