Last active
August 24, 2016 03:20
-
-
Save gmurphey/fc2d52803c5a66a68954134fac6f06f2 to your computer and use it in GitHub Desktop.
object array each
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
isVisible: false, | |
didInsertElement() { | |
Ember.run.later(() => { | |
this.set('isVisible', true); | |
}, 3000); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
words: Ember.computed('bWords', function() { | |
let a = Ember.A([{ | |
text: 'foo', | |
sort: 1 | |
}, { | |
text: 'bar', | |
sort: 2 | |
}, { | |
text: 'baz', | |
sort: 3 | |
}]); | |
if (this.get('bWords')) { | |
return a.filter((word) => { | |
return Ember.get(word, 'text').startsWith('b'); | |
}); | |
} else { | |
return a; | |
} | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.10.4", | |
"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.7.0", | |
"ember-data": "2.7.0", | |
"ember-template-compiler": "2.7.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment