Skip to content

Instantly share code, notes, and snippets.

@amk221
Last active October 17, 2016 15:55
Show Gist options
  • Save amk221/bb15ad9b4d19eb4e8257a054b69b31fd to your computer and use it in GitHub Desktop.
Save amk221/bb15ad9b4d19eb4e8257a054b69b31fd to your computer and use it in GitHub Desktop.
New Twiddle
import Controller from 'ember-controller';
export default Controller.extend({
init() {
this._super(...arguments);
console.log('application controller initialised');
}
});
import Controller from 'ember-controller';
export default Controller.extend({
init() {
this._super(...arguments);
console.log('error controller initialised');
}
});
import Controller from 'ember-controller';
export default Controller.extend({
init() {
this._super(...arguments);
console.log('loading controller initialised');
}
});
import Route from 'ember-route';
import RSVP from 'rsvp';
import { later } from 'ember-runloop';
export default Route.extend({
model() {
return new RSVP.Promise((resolve, reject) => {
later(() => {
reject(
new Error('failed to load application model')
);
// resolve();
}, 500);
});
},
actions: {
loading() {
console.log('application loading action');
return true;
},
error() {
console.log('application error action');
return true;
}
}
});
import Route from 'ember-route';
export default Route.extend({
activate() {
console.log('error route activated');
}
});
import Route from 'ember-route';
export default Route.extend({
activate() {
console.log('loading route activated');
}
});
:root {
padding: 15px;
}
:root::before {
content: "If you don't see anything here (apart from this message), then the Ember app produced a white screen of death :(";
}
{
"version": "0.10.5",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.8.0",
"ember-data": "2.8.0",
"ember-template-compiler": "2.8.0",
"ember-testing": "2.8.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment