Skip to content

Instantly share code, notes, and snippets.

@johanb
Last active December 25, 2015 14:09
Show Gist options
  • Save johanb/6988870 to your computer and use it in GitHub Desktop.
Save johanb/6988870 to your computer and use it in GitHub Desktop.
LHW.CompaniesIndexRoute = Ember.Route.extend
model: (params, queryParams, transition) ->
console.log queryParams
LHW.CompaniesIndexRoute = Ember.Route.extend
model: (params, transition) ->
console.log transition.queryParams.lat
console.log transition.queryParams.lon
# This one doesn't work :(
#model: (params, queryParams, transition) ->
# console.log "LOL: #{queryParams}"
# console.dir queryParams
activate: (params) ->
console.dir params
LHW.CompaniesRoute = Ember.Route.extend
model: (params, queryParams, transition) ->
console.log "LOL: #{queryParams}"
console.dir queryParams
//= require handlebars
//= require ember-canary
//= require ember-data
//= require_self
//= require_tree ./mobile/common
//= require ./mobile/laathetweten
Ember.FEATURES["query-params"] = true;
LHW = Ember.Application.create();
LHW.Router.map ->
@resource "companies",
{ queryParams: ['lon', 'lat'] }
, ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment