Skip to content

Instantly share code, notes, and snippets.

@allthesignals
Last active November 27, 2017 15:17
Show Gist options
  • Select an option

  • Save allthesignals/322788cf6f3e3d05c3264bae1630ef75 to your computer and use it in GitHub Desktop.

Select an option

Save allthesignals/322788cf6f3e3d05c3264bae1630ef75 to your computer and use it in GitHub Desktop.
example_controller
// 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