How to access query parameters from route in Ember 1.7

后端 未结 5 476
傲寒
傲寒 2020-12-16 12:08

In 1.7 Ember should support Query Parameters. I have no problems using them in controller but I\'d like to access them in Route, ideally in beforeModel hook but model hook w

5条回答
  •  甜味超标
    2020-12-16 12:22

    By specifying the query params in the controller, params will contain them automatically

    ApplicationController = Ember.Controller.extend({
      queryParams: ['test'],
      test: null
    });
    

提交回复
热议问题