I think that the controller should bring the data to view from model. However, is it controller's duty to tell how view should display the data, or the view should know how the data should be displayed?
To be more specific, I am writing a website, there are several databases as data model, the controller is written in Python, and view is written in AngularJS.
Now, on the view side, where should I code how the data is displayed, on the JavaScript side or on the Python side? E.g. I maintain a JSON file:
[{
"key": "name",
"column": "Name",
"align": "left"
},{
"key": "salary",
"column": "Salary",
"align": "right",
"filter": "salaryFilter"
}]
Should it be stored in personInfo.js, or personInfo.js should read it from controller via ajax?