Last active
November 27, 2017 15:17
-
-
Save allthesignals/322788cf6f3e3d05c3264bae1630ef75 to your computer and use it in GitHub Desktop.
example_controller
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
| // app/controller/users.js | |
| import Ember from ‘ember’; | |
| const { inject: { service }, | |
| computed: { alias } } = Ember; | |
| export default Ember.Controller.extend({ | |
| date: service(), | |
| dateFrom: alias(‘date.start’), | |
| dateTo: alias(‘date.from’), | |
| actions: { | |
| update(dateFrom, dateTo) { | |
| this.get(‘date’).setDates({ dateFrom, dateTo }); | |
| }, | |
| }, | |
| queryParams: [“dateFrom”, “dateTo”] | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment