Skip to content

Instantly share code, notes, and snippets.

@cloke
Created June 1, 2012 18:01
Show Gist options
  • Select an option

  • Save cloke/2854056 to your computer and use it in GitHub Desktop.

Select an option

Save cloke/2854056 to your computer and use it in GitHub Desktop.
simple view
M.HeadingView = Em.View.extend Ember.TextSupport,
viewName: 'heading_view'
content: null
attributeBindings: ['text']
editable: false
template: Ember.Handlebars.compile(
'{{#if this.editable}}
{{view Em.TextField valueBinding="content"}}
{{else}}
<h2>{{content}}</h2>
{{/if}}'
)
<div id="ember179" class="ember-view foo">
<script id="metamorph-4-start" type="text/x-placeholder"></script>
<h2>
<script id="metamorph-5-start" type="text/x-placeholder"></script>
<script id="metamorph-5-end" type="text/x-placeholder"></script>
</h2>
<script id="metamorph-4-end" type="text/x-placeholder"></script>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment