Last active
October 19, 2016 01:56
-
-
Save rajaalauddin/4dad2386e3c0985c593c4a6b357be771 to your computer and use it in GitHub Desktop.
Carousel
This file contains hidden or 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({ | |
activePage: Ember.computed('hireActivePage', function(){ | |
return this.get('hireActivePage'); | |
}), | |
oddNumber: 1, | |
didUpdateAttrs() { | |
console.log("didUpdateAttrs - paginator"); | |
this._super(...arguments); | |
this.updatePaginatorState(); | |
}, | |
updatePaginatorState() { | |
console.log("updatePaginatorState - paginator"); | |
this.moveToPage(this.get('activePage')); | |
}, | |
actions: { | |
changeIndex() { | |
console.log('changeIndex - paginator'); | |
this.oddNumber+=2; | |
this.set('activePage', this.oddNumber); | |
this.updatePaginatorState(); | |
} | |
} | |
}); |
This file contains hidden or 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({ | |
currentPage: 1, | |
actions: { | |
moveTo(pageNum) { | |
console.log('finally..' + pageNum); | |
this.set('currentPage', pageNum); | |
} | |
} | |
}); |
This file contains hidden or 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({ | |
evenNumber: 2, | |
currentSeniorHireActivePage: 1, | |
actions: { | |
changeHireActivePage() { | |
console.log('changeHireActivePage - newhires'); | |
this.evenNumber+=2; | |
this.set('currentSeniorHireActivePage', | |
this.evenNumber + 2); | |
} | |
} | |
}); |
This file contains hidden or 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({ | |
actions: { | |
moveToPage(moveTo, pageNum) { | |
moveTo(pageNum); | |
} | |
} | |
}); |
This file contains hidden or 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' | |
}); |
This file contains hidden or 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.6", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "beta", | |
"ember-data": "2.9.0", | |
"ember-template-compiler": "beta", | |
"ember-testing": "beta" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment