Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Ember from 'ember';
- export default Ember.Component.extend({
- computed: Ember.computed(function() {
- console.log('I was computed');
- return 'on compute me';
- }),
- _onDidReceiveAttrs: Ember.on('didReceiveAttrs', function () {
- console.log(`COMPUTED ${this.get('computed')}`);
- console.log('on didReceiveAttrs');
- }),
- _onInitAttrs: Ember.on('init', function () {
- console.log('on Init');
- }),
- init() {
- this._super(...arguments);
- console.log('Init function');
- },
- didReceiveAttrs() {
- console.log('didReceiveAttrs function');
- this._super(...arguments);
- }
- });
Add Comment
Please, Sign In to add comment