Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Beale mixonic

View GitHub Profile
View gist:832f33325a7a3a849aa777e7a3d90ea0
Talked with @dgeb, and I think this psuedo code would be correct for us to ensure we get the higher precedence for local/private lookups over global when resolving a pair of things:
```
`
b:/my-app/widgets/top-level
a:/my-app/widgets/x-mark
b:/my-app/widgets/top-level/x-mark
`
let source = 'b:/my-app/widgets/top-level';
View components.blurring-item.js
import Ember from 'ember';
function log(string) {
let node = $('<p>').text(`${string} (input? ${$('input').length > 0})`);
node.appendTo('body');
}
export default Ember.Component.extend({
tagName: 'input',
willRender() {
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View components.game-defender.js
import Ember from 'ember';
export default Ember.Component.extend({
});
View components.game-defender.js
import Ember from 'ember';
export default Ember.Component.extend({
left: 0
});
View components.log-hooks.js
import Ember from 'ember';
function log(component, string) {
let node = $('<p>').text(`${component.get('label')} - ${string}`);
node.appendTo('body');
}
export default Ember.Component.extend({
init() {
this._super(...arguments);
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
firstAppName: 'Ember',
lastAppName: 'Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
someObject: {
toString: () => 'someObject',
bar() { window.alert(this); }
},
foo() {
window.alert(this);
View injectlink.md
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
val: 'someVal',
actions: {
log(v) {
console.log(v);
}
}