Dor Zohar
Dor Zohar

Reputation: 199

When to use angular template and when symfony template

I'm newbie web developer and I wonder what better and if it is a good question at all

I can retrieve the information that I need from the server side and make the template with angular, and I can do it with symfony too. whats better? whats the difference? when to use what? what about forms? should I do it with symfony features or just with angular?

Upvotes: 0

Views: 88

Answers (1)

Asik
Asik

Reputation: 7977

Please look the following points

  • You should use Angularjs template system. otherwise, the powerful feature of Directives.
  • Angularjs is decoupled with serverside code.
  • Angularjs only expects data (as JSON) from service end..not any HTML. So template should be angularjs way.
  • So every service response from symfony should be JSON.
  • Angularjs totally avoiding to add HTML containers (through ajax) into web pages. So here you can not use symfony template.

Upvotes: 1

Related Questions