Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Ember from 'ember';
- export default Ember.Component.extend({
- didInsertElement: function() {
- this._super();
- this.get('parent.children').addObject(this);
- },
- total: Ember.computed.alias('parent.total'),
- rand: Ember.computed('parent.model.array.[]', 'parent.rands.@each.value', 'total', function() {
- return { value: Math.random(100) };
- }),
- willDestroy() {
- this.get('parent.children').removeObject(this);
- this._super();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement