Created
August 24, 2015 05:59
-
-
Save shortly-portly/82e62ed5ecb82e9bfb1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// My User List View | |
module.exports = View.extend({ | |
template: require('../templates/userList.jade'), | |
autoRender: true, | |
render: function() { | |
this.renderWithTemplate(); | |
this.renderCollection( | |
this.collection, | |
userDetail, | |
this.el.querySelector('.itemContainer')) | |
} | |
}) | |
// My User Detail View | |
module.exports = View.extend({ | |
template: require('../templates/userDetail.jade'), | |
autoRender: true, | |
bindings: { | |
'model.firstName': { | |
type: 'text', | |
hook: 'firstName' | |
}, | |
'model.lastName': { | |
type: 'text', | |
hook: 'lastName' | |
}, | |
'model.admin': { | |
type: 'text', | |
hook: 'admin' | |
} | |
} | |
}) | |
// My User List Template | |
div.container | |
div.well | |
h3 List Users | |
table.table | |
tr | |
th First Name | |
th Last Name | |
th Admin | |
tr.itemContainer | |
// My User Detail Template | |
<WHAT GOES HERE????> | |
td(data-hook='firstName') | |
td(data-hook='lastName') | |
td(data-hook='admin') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment