Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question w Master/Detail scenario #184

Closed
creativeknights2012 opened this issue Sep 16, 2014 · 1 comment
Closed

question w Master/Detail scenario #184

creativeknights2012 opened this issue Sep 16, 2014 · 1 comment
Labels

Comments

@creativeknights2012
Copy link

If I wanted to programmically navigate to a page using pager.navigate('Detail'); How can I get the full route to get to this page dynamically along with passing viewModel object parameters? For Instance, this function is bound to lists:

self.selected = function (item) {
var url = pager.page.activePage$() + "/Detail";
pager.navigate(url);
self.selectedItem(item);
};

the pager.page.activePage$() is an undefined function in this scenario.

also this method only returns the 'Detail' string
var url = pager.page.getFullRoute()().join('/') + "Detail";

Ok maybe I'm not explaining my objective. I'm trying to create a Master/Detail scenario. When I create the link <a data-bind="page-href:{id:'Detail'}>. I don't see an option or capability to transfer the selected object to the detail's page, or have the selected object's ID be executed upon display, for example, or the above example scenario as well...

@creativeknights2012 creativeknights2012 changed the title question with navigating question w Master/Detail scenario Sep 17, 2014
@finnsson
Copy link
Owner

Hi,

there seems to be a problem in the example code. It should be

pager.activePage$()

instead of

pager.page.activePage$()

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants