Skip to content

Instantly share code, notes, and snippets.

Tom Dale tomdale

Block or report user

Report or block tomdale

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View components.container-component.js
import Ember from 'ember';
export default Ember.Component.extend({
componentName: "inner-component",
actions: {
handleComponentChange() {
this.set('componentName', "second-component");
tomdale / example.html
Created Dec 27, 2011 — forked from tdreyno/example.html
Live collection example in Ember
View example.html
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Collection Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
View bind_block.handlebars
MyApp.MyObj = SC.Object.extend({
type: "isString",
isString: function() {
return this.get('type') === 'isString';
{{#collection "App.FieldsView" tagName="ul"}}
{{#with content}}
View my_page.js
contentBinding: 'Authoring.reportTemplatesArrayController.content',
selectionBinding: 'Authoring.reportTemplatesArrayController.selection',
classNames: 'sc-list-item-view'.w(),
childViews: 'nameLabel'.w(),
Add 'sel' class in render method.
render: function(context) {
View gist:337732
// dynamically apply a mixin specified in an object property
var MyClass = SC.Object.extend({
extraMixin: null,
foo: "bar",
init: function() {
arguments.callee.base.apply(this, arguments);
View Currencyconverter.converterController
// ==========================================================================
// Project: Currencyconverter.converterController
// Copyright: ©2009 My Company, Inc.
// ==========================================================================
/*globals Currencyconverter */
/** @class
Converts one form of currency to another.
You can’t perform that action at this time.