Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone have an experience in using Craft in conjunction with a front-end JS MVC/MVVM framework such as Backbone, Ember or Angular?

We have a project coming up where there may be a lot of JS state management requirement and AJAX calls required, and would like to access back-end data using JSON. However, there is also a strong need for a robust easy-to-use CMS as there will be a lot of content to administer.

My first port of call for this type of application would be some more general server-side framework such as Laravel, but Craft has sort of spoiled us with the content management side of things.

Is there any way of marrying Craft with this kind of project?

share|improve this question
up vote 4 down vote accepted

I am just starting out on a project using both Craft and Angular. I ran into an early issue because both Angular and Twig use the {{ }} braces, but that was quickly fixed by changing Angular’s settings like in this Stackover flow post.

As Christian noted in the comments, though, you could also use the {% verbatim %} tag to keep Craft from parsing Angular tags.

Aside from that, I haven't had issues since Craft gives you full frontend control and there are no CMS scripts on the frontend to worry about. And (so far) Craft's dynamic routes make it really quite easy to set up your templates, JSON, etc.

share|improve this answer
Twig also has the {% verbatim %} tag for sections that shouldn't be parsed. I'd simply wrap my Angular code with that. – carlcs Jul 4 '14 at 14:50
This is a great point - I've heard that some outside Angular modules may have braces hardcoded, so this may be a more surefire way for them to work properly. – Patrick Harrington Jul 4 '14 at 14:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.