Skip to content

Instantly share code, notes, and snippets.

@tomdale
Forked from chrisconley/bind_block.handlebars
Created June 23, 2011 21:49
Show Gist options
  • Save tomdale/1043719 to your computer and use it in GitHub Desktop.
Save tomdale/1043719 to your computer and use it in GitHub Desktop.
MyApp.MyObj = SC.Object.extend({
type: "isString",
isString: function() {
return this.get('type') === 'isString';
}.property('type')
});
{{#collection "App.FieldsView" tagName="ul"}}
{{#with content}}
{{title}}
{{#if isString}}
<input type="text" name="something">{{hint}}
{{/if}}
{{#if isSelect}}
<select><option>Hello</option></select>
{{/if}}
{{/with}}
{{/collection}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment