1
  {{#each user.Addtasks}}

{{#if {{this._id}} == {{ID}} }}

Statement;

Statement;

{{/if}}

{{/each}}

Here _id and ID both are getting passed from route to the handlebar page and now I want to compare them. How do I compare the two using ==?

Adriaan
  • 17,741
  • 7
  • 42
  • 75
Vikas Yadav
  • 13
  • 1
  • 5
  • Let me know how can I achieve that as the above statements are not giving the results. – Vikas Yadav Aug 01 '20 at 17:17
  • 1
    See here: [https://stackoverflow.com/questions/34252817/handlebarsjs-check-if-a-string-is-equal-to-a-value](https://stackoverflow.com/questions/34252817/handlebarsjs-check-if-a-string-is-equal-to-a-value) – tsummer2 Aug 01 '20 at 17:26
  • Does this answer your question? [Handlebarsjs check if a string is equal to a value](https://stackoverflow.com/questions/34252817/handlebarsjs-check-if-a-string-is-equal-to-a-value) – eol Aug 01 '20 at 17:30
  • But i want to compare two values fetched from the route handlebar page which is written in two double brackets {{ }}. The comparison values are: {{this._id}} and {{Id}} – Vikas Yadav Aug 01 '20 at 18:18

0 Answers0