Dynamically set query params
See original GitHub issueI would like to be able to define some query parameters dynamically. My first approach is to do this from the Route in setupController
:
setupController(controller, model) {
// Parachute things here, dynamically build QP configuration object
const parachuteController = controller.reopen(ParachuteParams.Mixin);
super.setupController(parachuteController, model);
}
This does not work because the query params don’t seem to be set or updated when the properties are changed on the controller.
I’ve researched this quite a bit, but I can’t find any different approach other than this discussion.
Any thoughts appreciated, thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Dynamically create query Params in Angular 2 - Stack Overflow
i want to achieve that the queryParams can be dynmamically passed it. For now i can set the values of the params dynamically,...
Read more >How do you set dynamic query parameters in Mule 4
Here "dynamicQueryParams" is created inside a dataweave and it can be dynamic based on all application conditions in dataweave. Let me know if...
Read more >How to pass Query parameter dynamically in REST API method
1) Set ${order_number} in query parameter value · 2) Click Auto Generate Variables related link · 3) Make sure Variable is added in...
Read more >Dynamic M query parameters in Power BI Desktop
With dynamic M query parameters, model authors can ensure that filter selections incorporate into source queries at the right point to achieve ...
Read more >How to dynamically add a query string to all links in a page
Recently I needed to modify all the links in my blog to add a query string parameter. As you can imagine, this is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I actually found somewhat of a solution for my problem:
I looked into the source code and the query-params are computed based off the original object which the mixin is generated from. So if we reset
as
on the qp’s on the original object the mixin also has the new attributes.on a side note; is it possible to dynamically set the
as
attribute since i use my component for multiple models and they have different QP names.