I'm developing a feed type of application. Items in the feed are different types of models. For example, I could have StatusUpdateModel, AdPostModel, ImagePostModel, etc. Each of these have their own templates for the feed.
How can I render the correct template for each model in my array?
// model = [StatusUpdateModel, AdPostModel, ImagePostModel]
{{#each model}}
{{render '?' model}}
{{/each}}
Aucun commentaire:
Enregistrer un commentaire