Question/Issue about uri parameters binding #148

maustand opened this Issue Oct 15, 2013 · 2 comments


None yet
3 participants

Hello guys
Im a newbie using pagerjs, ( by the way, im coding my first project implementing this library ) so still im learning and i'm so glad working with pagerjs.

Well i have a little issue or question that i i'd love to resolve, im trying to send a few parameters, sending it with the uri binding from a view model to another new viewmodel, always im getting "undefined" on this observables without matters if the new view model observables has the same parameter name..

For example :

this is my binding where i set my parameters to wait :

      <div id="divPasajes"data-bind="page:{id: 'pasajesDisponibles', withOnShow: App.Common.Aux.getVM('Pasajes'),  
            title: 'Seleccionar Servicio', sourceOnShow: 'Servicios/Pasajes', sourceCache: false, 
            params: ['origenTerminal', 'destinoTerminal', 'IsOneWay', 'cantidadPasajeros', 'fechaIda', 'origenTerminalNom' ] }">          

and this is my another binding wher i set the observables to send and to bind my view model parameters :

                            <div class="col-xs-12 col-sm-4 col-md-4">
                                <br />
                                <a id="btnBuscarPasaje" data-bind="click: buscarPasajes, 
                                    page-href: { path: '../Servicios/pasajesDisponibles', 
                                    params: {origenTerminal: origen.idTerminal }}"
                                  type="button" class="btn btn-default  btn-sm btn-block">Buscar</a>

then when i click my link and send it my parameters, my uri string is this :


On my newview model init function, Its output is :

console.log(self.origenTerminal()); // Undefined ...

then i'd love to know how i could bind those parameters with the values from the querystring, I thought that automatic pagerjs would do it but maybe i got confuse.

At the moment im retrieving my parameter without a custom functon that it takes the URI string and get the parameters for to bind them with my view model observables.
but i dont know if pagerjs has support for this cuze when on my view, i can retrieve my parameters without any problems as the pager example shows but can't do it from one viewmodel to another view model.

Then my question is : how can i retrieve my parameters from my new view model ? There's one way to do it ? or just i have to write a custom function for to decode the uri string ?

thanx you for your time and i hope somebody can explain me this.

So long

This comment has been minimized.

Show comment Hide comment

gabidi Mar 14, 2014

I'm really interested in this too. Thank you

gabidi commented Mar 14, 2014

I'm really interested in this too. Thank you

@DKhalil DKhalil closed this May 15, 2017

This comment has been minimized.

Show comment Hide comment

DKhalil May 15, 2017


Closing for cleanup


DKhalil commented May 15, 2017

Closing for cleanup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment