jeudi 7 novembre 2019

Writing a javascript method in controller or some other place and calling it from Handlebars

for some reason whatever helper functions that I am writing , they are not working in my Handlebars, saying that they are not helper functions. I want two things:

  1. Is there anyway I can write functions in controller and call them easily from the Ember? If yes can you please give me example or link or some help how can I do it?
  2. Can I assign variables etc in ember each loops, like if I can declare a variable in outer each loop and assign it in the inner each loop and then use that assigned value after the inner loop finishes
  3. For some reason, my ifCond helper is not working, it says that ifCond is not a helper, is there any builtin if for comparing two values and return true or false in ember, like two different string etc

Any help please - thank you.




Aucun commentaire:

Enregistrer un commentaire