Implementing the Controller and Sub-Application
Explore how to implement controllers and sub-applications in Marionette.js. Understand using command handlers to enable sub-apps to control the header menu and manage navigation events, improving app structure and user interaction.
We'll cover the following...
We'll cover the following...
Adding the List controller
With the data and display portions ready, let’s add the controller:
Now, we need to display our header menu:
We’ve implemented a command handler in lines 9–11 so other sub-apps can command our header to highlight a different entry.
Tip: What’s the difference ...