Skip to content

Instantly share code, notes, and snippets.

@elffey
Created June 28, 2011 13:42
Show Gist options
  • Save elffey/1051155 to your computer and use it in GitHub Desktop.
Save elffey/1051155 to your computer and use it in GitHub Desktop.
itemView: SC.TemplateView.extend({
templateName: 'navigation',
submenu: SC.TemplateCollectionView.extend({
contentBinding: '.parentView.content.menuItems',
itemView: SC.TemplateView.extend({
hash: '#!/',
buttonPressed: function() {
console.log(this.get('content'));
},
contentDidChange: function() {
console.log(this.get('content'));
this.set('hash', '#!/' + this.getPath('content.hash'));
}.observes('content')
})
})
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment