Exercise: Declaring a Template Sub-Module

Check your understanding of declaring a sub-module template in Marionette.

Declaring a new sub-module for a template

We want to access a listItemView template from within a dedicated sub-module with ContactManager.ContactsApp.List.Templates.listItemView.

What should our code look like?

We have already connected the newly created file by adding it to index.html and adding its template to list_view.js. You can see those modifications in the highlighted lines in the files.

Code playground

Write your solution in the space given below the comment:

Get hands-on with 1200+ tech skills courses.