javascript - Passing Query Parameters Into Component EmberJS -


i have large number of query parameters route right now, , have component resides in route's template.

i want query parameters updated upon change inside component, pass in query parameters via component like:

{{comp-name query_param1=query_param1 ... query_param=query_param20 }}

i update query params in component with:

{{input value=query_param_x}}

however, gets tedious , overwhelmingly long passing in 20 parameters. there way make more concise?

note: application developing on ember 1.12 , not using ember-data.

you can create object contains params, similar this:

params = {     query_param1,     query_param2,     ... } 

pass in params object instead of each individual param:

{{comp-name params=params}} 

also, try think if component needs many parameters. there way break down less complex, smaller components, etc.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -