Last active
February 26, 2019 08:04
-
-
Save kumkanillam/7bcee950caf538b87eac0e42b384a7eb to your computer and use it in GitHub Desktop.
MixinPropsChnagedInComponent
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({ | |
init(){ | |
this._super(...arguments); | |
console.log('pricing component init ',this.get('adminCount')); | |
}, | |
didInsertElement(){ | |
this._super(...arguments); | |
}, | |
didReceiveAttrs(){ | |
this._super(...arguments); | |
console.log('didReceiveAttrs'); | |
this.set('adminCount',2); | |
}, | |
actions:{ | |
pricingPagePrint(){ | |
this.set('adminCount',this.get('adminCount')+1); | |
console.log('pricingPagePrint :',this.get('adminCount')); | |
} | |
} | |
}); |
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'; | |
import PricingController from 'twiddle/mixins/pricing-controller'; | |
export default Ember.Controller.extend(PricingController,{ | |
appName: 'Ember Twiddle', | |
init(){ | |
this._super(...arguments); | |
console.log('application init'); | |
}, | |
actions:{ | |
showPopup(){ | |
console.log('showpopup ',this.get('adminCount')); | |
//this.toggleProperty('showPopup'); | |
this.set('appName','change'); | |
} | |
} | |
}); |
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.Mixin.create({ | |
adminCount:1, | |
showPopup:false, | |
init(){ | |
this._super(...arguments); | |
console.log('init pricing controller '); | |
} | |
}); |
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.15.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", | |
"ember": "2.14.1", | |
"ember-template-compiler": "2.14.1", | |
"ember-testing": "2.14.1" | |
}, | |
"addons": { | |
"ember-data": "3.4.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment