Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Passing parameters to another page with stack.js and executing code on page load #30

Closed
aymanfarhat opened this issue Jun 18, 2013 · 2 comments

Comments

@aymanfarhat
Copy link
Contributor

Hello I am looking into using/extending stack.js page to be used as a detail view for an app. For example I have a page called profile.html which is opened from my index via stack.js.

What I'd like to do is open profile.html with a parameter such as profile.html?id=1 and when profile.html loads execute a callback to query a remote database and populate some DOM elements in profile.html

Is there a certain pattern which can be followed for now in order to achieve such a thing? I think this feature can be a great use for future releases.

@jaunesarmiento
Copy link
Owner

Hi @aymanfarhat, as of now there is no such pattern to achieve this. You can however save these parameters in a global variable, catch the push event that stack.js fires, and then using the parameters from there. This may not be the best solution to this.

I'm open to suggestions on how to implement this or if we even should implement it at all. I also think this could be a great addition to Fries since I'm not just aiming to make Fries a prototyping tool.

@jaunesarmiento
Copy link
Owner

I believe this is related to #26.

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

No branches or pull requests

2 participants