Created
July 3, 2019 16:06
-
-
Save gtb104/6531a7b8336689875efa76a3fd31c4e4 to your computer and use it in GitHub Desktop.
New Twiddle
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.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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.Service.extend({ | |
const DEFAULT_COUNT = 0; | |
export default Service.extend({ | |
init() { | |
this.metaTabCount = DEFAULT_COUNT; | |
this.recentQueryTabCount = DEFAULT_COUNT; | |
}, | |
setMetaTabCount(count = DEFAULT_COUNT) { | |
console.log('updated meta count in service', count); | |
this.set('metaTabCount', count); | |
}, | |
setRecentQueryTabCount(count = DEFAULT_COUNT) { | |
console.log('updated RQ count in service', count); | |
this.set('recentQueryTabCount', count); | |
this.notifyPropertyChange('recentQueryTabCount'); | |
}, | |
resetAll() { | |
this.setMetaTabCount(DEFAULT_COUNT); | |
this.setRecentQueryTabCount(DEFAULT_COUNT); | |
} | |
}); |
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": true, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", | |
"ember": "3.4.3", | |
"ember-template-compiler": "3.4.3", | |
"ember-testing": "3.4.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment