0

Just wondering if anyone has figured the best way to use AngularJS vars within an EE form (Solspace Favorites in this case) as the entry id does not exist when the form tag get's processed in the server.

Example: {exp:favorites:info entry_id="{{ article.entry_id }}"} wouldn't work as the entry_id gets parsed in the browser.

Thanks, Alberto

  • That would indeed never work because {exp:...} tags (or any server-side code: PHP, etc), which are processed by the server, are parsed, processed, and the final template sent to the browser before javascript (Angular in this case) does its own processing. Javascript happens from the client's browser, which happens after the server is done processing a page. – Solspace Sep 14 '15 at 12:10
  • Thanks guys. Tried to replicate the form tag with the hidden fields etc but no success there. Will try to find an alternative but I can't see too many options at the moment to accomplish this. – Alberto Sep 15 '15 at 2:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.