Skip to content

Instantly share code, notes, and snippets.

View Serabe's full-sized avatar

Sergio Arbeo Serabe

View GitHub Profile
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['red'],
didInsertElement() {
window.nested = this;
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
foos: ['hello', 'goodbye', 'maybe'],
bar: 'maybe'
});
@Serabe
Serabe / components.data-binding.js
Created February 25, 2018 11:18 — forked from nightire/components.data-binding.js
possible bug about one way binding
import Ember from 'ember';
function logLifeCicle(name) {
return function() {
console.log(name, arguments);
};
}
export default Ember.Component.extend({
bar: 0,
@Serabe
Serabe / components.my-component.js
Created January 27, 2018 23:41 — forked from peabnuts123/components.my-component.js
Tagless Element ES Class
import Ember from 'ember';
export default class MyComponent extends Ember.Component {
tagName = '';
constructor() {
super(...arguments);
// Empty string causes runtime error
// "Assertion Failed: You cannot use `elementId` on a tag-less component"
import Ember from 'ember';
export default Ember.Component.extend({
});
@Serabe
Serabe / controllers.application.js
Last active October 26, 2017 22:19 — forked from RyanNerd/controllers.application.js
Race Condition on run.later() with logs
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
logger: Ember.inject.service(),
textBoxInDOM: Ember.computed(function()
{
let elem = document.getElementById('codeThing');
alert((typeof elem));
return (typeof elem);
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
try {
this.sendAction('register', this);
} catch (ex) {}
}
});
@Serabe
Serabe / controllers.application.js
Last active February 24, 2017 16:01 — forked from aonawale/controllers.application.js
queryParam map to different controller property
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@Serabe
Serabe / controllers.application.js
Created February 24, 2017 15:59 — forked from aonawale/controllers.application.js
queryParam map to different controller property
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});