Last active
January 3, 2019 22:52
-
-
Save rtablada/bad1dd32c81f9c4d93864cd0a59e19ac 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'; | |
import { inject as service } from '@ember/service'; | |
import { computed } from '@ember/object'; | |
export default Ember.Controller.extend({ | |
router: service(), | |
appName: 'Ember Twiddle', | |
value: 0, | |
queryParams: ['value', 'value2'], | |
isActive0: computed('router.currentURL', function() { | |
return this.router.isActive('index', { queryParams: { | |
value: 0 | |
} }); | |
}), | |
isActive1: computed('router.currentURL', function() { | |
return this.router.isActive('index', { queryParams: { | |
value: 1 | |
} }); | |
}), | |
isActive2: computed('router.currentURL', function() { | |
return this.router.isActive('index', { queryParams: { | |
value: 2 | |
} }); | |
}), | |
}); |
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
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
button { | |
font-size: 1.2rem; | |
} | |
button.active { | |
background: blue; | |
color: white; | |
} |
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": "3.4.3", | |
"ember-template-compiler": "3.4.3", | |
"ember-testing": "3.4.3" | |
}, | |
"addons": { | |
"ember-data": "3.4.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment