Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

pb with emberjs syntax: {{#each}}

Hi I'm trying to use emberjs. double brackets are used in this library, eg {{#each}}

This produce a Volt compling error: Scanning error before 'each}}

is there a workaround ?



5.6k
Accepted
answer

You can write this way {{ '{{#each}}' }}

Of course better approach is loading javascript views by some sort of api with php view engine. Of course even better are static html files. Only drawback of static files is that in js app you must have your own i18n system.



31.2k

Hi, thank you for help.

{{ '{{#each}}' }} output raw text {{#each}}
-(

I've also tried with phtml view file but the output is the same raw text ...



31.2k

I've just tried with a static html page, and same result ... so there must be something wrong in my js code.

but that is the point.

Phalcon just return html with raw text {{#each}} it's ember responsibility to make magic here. If this don't work than in your ember code is something wrong. I can't help you with ember because I use this approach in AngularJS and have no problems if angular app is proper initilized with java script.

Please first try write your ember app without phalcon (just html and javascript) and then integrate it with phalcon.



31.2k

I will investigate that further tomorrow. Time to go to bed ! Thanks again. See you later



31.2k

Late response: Your solution works well, I had problems in my js code.