Skip to content
This repository

Should be possible to send URI (fragment identifier) parameters to a page #25

Closed
finnsson opened this Issue · 0 comments

1 participant

Finnsson
Finnsson
Owner

A page should be able to access the information in the current route - changing a view-model.

Sending parts of the fragment identifier to variables in the view-model is possible using
params.

<div data-bind="page: {id: 'search', params: {'name', 'fromdate'}}">
  <span data-bind="text: name"></span> (<span data-bind="text: fromdate"></span>)
</div>

where name and fromdate with be bound by the parameters name and fromdate.

An example route for the example above could look like

example.com/#search/tv?name=samsung&fromdate=20121010

or if HTML5 history is used

example.com/search/tv?name=samsung&fromdate=20121010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.