Skip to content

Instantly share code, notes, and snippets.

@pixelhandler
Forked from lstyles/controllers.application.js
Last active August 29, 2015 14:26
Show Gist options
  • Save pixelhandler/d109aab10ab19b7d12bd to your computer and use it in GitHub Desktop.
Save pixelhandler/d109aab10ab19b7d12bd to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
export function initialize(container, application) {
application.register('controller:application', 'ApplicationController', { singleton: false });
}
export default {
name: 'application-init',
initialize: initialize
};
import Ember from 'ember';
export default Ember.Route.extend({
setupController: function(controller,model) {
this._super(controller,model);
controller.var1 = "Variable 1";
},
renderTemplate: function(appController) {
this.render('application', {
controller: appController
});
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{var1}}
<br>
<br>
{
"version": "0.4.7",
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.13.6/ember.js",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/1.13.7/ember-data.js",
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.13.6/ember-template-compiler.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment