-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Pseudo Code #3
Comments
I @stephenplusplus ! Thanks for your idea :) This is more or less that the idea that immerge from #1. But with a marquee tag :D |
Haha, well, nobody really mentioned what the template would look like (at least that I found), which is a very important piece of this puzzle. |
Well, in my solution, it's pretty the same as yours. replace your |
@ProLoser: It's interesting reading your solution, as I was working on my own, which is quite similar. I didn't want to pollute #1 with my code ideas below, so I thought a new topic to discuss the interface might be helpful. Personally, once I know how I want to start using something, it makes it a lot easier to understand how to go about implementing it.
So, here's what my idea looked like:
These
andWhen
s can be nested deeper, following the definition of the route object./long-form
behaves as normal
/long-form/first-step
accessed directly from URL entry:
/long-form
$route to array of dependenciesandWhen['/:step']
$route to array of dependencieslong-form.html
and link toLongForm
scopelong-form/step.html
and link toLongFormStep
scopeaccessed coming from /long-form or another /long-form/sub-page:
*
/long-form.html
would have already been resolved, compiled, and linked to theLongForm
controller.andWhen['/:step']
$route to array of dependencieslong-form/step.html
and link toLongFormStep
scopeHere's what the template HTML would look like, adding a new
route
directive to embed the views.long-form.html
When
long-form.html
is compiled, only the matchingroute
directive would be included. So, when a user is loading/long-form/first-step
,long-form.html
would compile the<route view="step" />
. The value of theview
attribute is connected to theandWhen
key. That way, when<route view="step" />
is compiled, it knows where to grab the template from. Then it's business as usual for the injected template and controller.I wish I had time to contribute more on this. My 11 week old daughter thinks I love JavaScript more than her, so my hands are tied. There are obviously a lot of changes that would need to be made for an idea like this to work. Is this within the scope of what this project and its team are attempting to accomplish?
Thanks everyone for taking on this issue! I look forward to following the progress and hopefully spending time helping out.
The text was updated successfully, but these errors were encountered: