Skip to content

Instantly share code, notes, and snippets.

@ehelms
Created July 10, 2013 17:44
Show Gist options
  • Save ehelms/5968456 to your computer and use it in GitHub Desktop.
Save ehelms/5968456 to your computer and use it in GitHub Desktop.
<div class="detail">
<span class="info-label">{{ "Content View" | i18n }}</span>
<span class="info-value" alch-edit-select="system.content_view.name"
options="contentViews.records" on-save="setContentView(system.content_view)">
</span>
</div>
.directive('alchEditSelect', function() {
return {
replace: true,
scope: {
model: '=alchEditSelect',
options: '=options',
handleSave: '&onSave',
handleCancel: '&onCancel'
},
template: '<div>' +
'<select ng-model="model" ' +
'ng-options="option.id as option.name for option in options" ' +
'ng-show="editMode">' +
'</select>' +
'<div alch-edit></div>' +
'</div>'
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment