Add the User View
Finally, you add a simple page view that displays a selected customer’s details. This view is the second page in this app. The customer navigates to it by tapping an item in the Users list view. The user-page
template defines a Back button that returns the customer to the search list.
-
Immediately after the
UserListItemView
view definition, create the view for a customer’s details. ExtendBackbone.View
again. For the remainder of this procedure, add all code in theextend({})
block. -
Specify the template to be instantiated.
-
Implement a
render()
function. This function re-reads the model and converts it first to JSON and then to HTML.
Here’s the complete extension.