Moving the App Initialization Handler
Explore how to refactor a Marionette.js application by moving the app initialization handler from the index page into a dedicated app.js file. Understand when to use document ready calls and learn strategies for managing templates either on the server or via compiled approaches. This lesson helps you organize code into modular components, improving maintainability.
We'll cover the following...
We'll cover the following...
Cleaning up our code
There’s not much left on our index page, but let’s finish cleaning up by moving our start handler code to our application file:
Our app.js file now contains the following code:
...