Symfony2和AngularJS。 有人能解释一下吗? [关闭]

how are you going? Came here to ask you how symfony2 and angularjs can work together, because I tried to find and read about it on google and others, but I still can't understand at all. -Is it possible? -If it is possible, what are the advantages and disadvantages? -symfony2-jquery or symfony2-angularjs? or both(i still don't underestand)?.. -What about twig? how can I work with the {{}} of angular (just explain me how, not the implementation)?

One thing you can do is to implement a REST API with Symfony that provides data and then create a web application with AngularJS that consumes data from the REST API. I'm pretty sure you can find a lot of examples of that by looking on Google.

If you wanna use angular you must use {% verbatim %} tag like this:

{% verbatim %}
    <ul>
    {% for item in seq %}
        <li>{{ item }}</li>
    {% endfor %}
    </ul>
{% endverbatim %}

Inside tag you can write angular code