Search⌘ K
AI Features

Passing Parameters to Views and SerializeData

Explore how to pass parameters to Marionette.js views using initializers and customize the serializeData method to provide dynamic content for templates. Understand how to display different loading messages for submodules by setting title and message options, and learn to utilize the getOption helper for cleaner code. This lesson helps you manage data latency messaging effectively within Marionette applications.

Let’s take a step back and think about our app for a second. Our List controller displays a loading view saying that data is being loaded with an artificial delay. However, that’s not true. We need some way to display a different loading message for our List submodule.

We could simply add a new template with a different loading message and provide the proper template when ...