Skip to content

Instantly share code, notes, and snippets.

@e00dan
Last active October 5, 2015 20:12
Show Gist options
  • Save e00dan/34d36b9121e017d2388f to your computer and use it in GitHub Desktop.
Save e00dan/34d36b9121e017d2388f to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
init() {
const message = 'Test message.';
const options = { id: 'test', until: '3.0.0' };
// passing function
Ember.deprecate(message, function() {
return true;
}, options);
const myConstructor = {}.constructor;
// passing constructor (also a function)
Ember.warn(message, myConstructor, options);
// passing function with double arrow syntax
Ember.assert(message, () => true, options);
this._super();
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
{
"version": "0.4.11",
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "http://builds.emberjs.com/tags/v2.2.0-beta.1/ember.debug.js",
"ember-template-compiler": "http://builds.emberjs.com/beta/ember-template-compiler.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment