What is the recommended way of specifying Ember JS content?
For example, lets say I have a table and the table has certain columns on the web page.
Where would I specify the title of the table and the columns of the table?
Currently, at my company, developers will store JSON with all the content for the table. For instance, they will create a table class in Python on the backend with something like:
class UserTable(object):
table_title = 'This is the table title'
columns = ['user', 'first name', 'title']
rows = [['test_user', 'John', 'Software Engineer']]
This seems almost like we are delegating the presentation logic to the backend. Is there a better place to be defining the contents of the table for instance, the title of the table? Is this bad practice in Ember?
Aucun commentaire:
Enregistrer un commentaire