Displaying Content from a Model
Learn how to declare models in Marionette js and how to get data to display from models in our application.
We'll cover the following
Now that we’ve covered displaying static content, let’s move on to displaying content containing data from a model. As you may know, one of Backbone’s selling points is the possibility of structuring JavaScript applications with a model-view-controller (MVC) pattern. In this pattern, we use so-called models to interact with our data, passing them onto views for rendering the information they contain.
So, let’s declare a model within our JavaScript block above our view declaration:
Get hands-on with 1400+ tech skills courses.