Guest User

Untitled

a guest
Nov 21st, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. import Ember from 'ember';
  2.  
  3. export default Ember.Component.extend({
  4. computed: Ember.computed(function() {
  5. console.log('I was computed');
  6. return 'on compute me';
  7. }),
  8.  
  9. _onDidReceiveAttrs: Ember.on('didReceiveAttrs', function () {
  10. console.log(`COMPUTED ${this.get('computed')}`);
  11. console.log('on didReceiveAttrs');
  12. }),
  13.  
  14. _onInitAttrs: Ember.on('init', function () {
  15. console.log('on Init');
  16. }),
  17.  
  18. init() {
  19. this._super(...arguments);
  20. console.log('Init function');
  21. },
  22.  
  23. didReceiveAttrs() {
  24. console.log('didReceiveAttrs function');
  25. this._super(...arguments);
  26. }
  27. });
Add Comment
Please, Sign In to add comment