Questions about template syntax and usage of angular.js.

  node.js, question

Generally speaking, web projects are currently being developed. When it comes to a set of pages. There are two ways. Either use template syntax like jade(node), (php)smarty template, razor(C#) and so on. The background variables are directly bound to the front-end html through template syntax. This is an option, which is mostly done by back-end programmers. Another binding method is the front-end MVC js framework. There are knockout,angular and so on. These frameworks can completely separate the background from the front end and only take data through asynchronous requests. The separation of that front end and the rear end is realize. I wonder which model is better now. Because even using angular to bind data. The binding work is generally done by back-end programmers. In which case is template grammar more suitable and when is angular? It is also related to the front-end capability of the company. Because now I work for my company and I do all these things.

1. If usedAngularIf so, there are generally two types of data interaction between the front and back ends, one is throughRESTfulOne is to render the data to the front-end template through the back-end as you said. However, no matter which method is adopted, front-end engineers are required toAngularIs more skilled, in this way, once you pass the data to the front end, then he will be handy in processing.
Generally speaking, if it is usedAngularThen the development of front and back ends is generally separated, and there is not much interaction with each other. The front end can simulate the data itself, and only needs to interface with the front and back ends to test whether the data given by the data interface is complete, which is basically the case.
3. RegardingknockoutI haven’t used it and I don’t know it very well.
4. For using some template engines, there are more places to render data than the back end, and it is not very good for testing.
In a word, we should analyze according to the specific situation of your company, and consider many factors, one is the ability of the front end of the company, the other is the time, the development mode suitable for your company is the best.