-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Parent path continues to drill down depth with multiple conditionals #583
Comments
Agree with the issue. Really annoying. |
Each helper controls the context that it uses. For Closing this as the templates that you listed in the requested section should work fine. If they do not then feel free to post a failing jsfiddle and we can reopen. |
really annoying |
what about making children scopes inherit all members of ancestors? that would make this problem go away, and it's easy to implement using javascript object prototype. |
This behavior was changed under 4.0. See #1028 |
@kpdecker from what I understand the change is now I want to do:
and have it work as expected, without having to specify `{{../baseUrl}}``, that easily achievable if each context inherits from its parent. |
That particular behavior was implemented quite a while ago but is behind a Many use cases don't need this level of performance, so each project can On Mon, Feb 8, 2016 at 3:38 PM Benjamín Eidelman notifications@github.com
|
oh nice! |
I looked into proto for the cases where it was possible (most aren't On Mon, Feb 8, 2016 at 3:50 PM Benjamín Eidelman notifications@github.com
|
There is some confusion with depth. The parent path behaves differently when in a loop and when displaying a single piece of data. Additionally, the way that depth is created is not very clear.
The expected result of nesting one conditional within another is that the depth does not increase. If a loop was nested in a loop, then the increase of depth would make sense.
Here is an example of how depth works in a loop. When referencing the model value of
options
it is expected to use the../
context to reach the root model. However, when nesting an additional (same model) conditional, it is unexpected to travel further down the depth to the../../
context. Finally, once we've reached our final depth, the looped model still uses the root context (expected), but the sameoptions
model, when used as a value needs to have a context one level further down to../../../
, this is also unexpected.Here is an example of a single model with nested conditionals. Like the looped model, each nested conditional is required to drill one level deeper in it's context. However, unlike the looped mode, once we reach the final depth, the
options
model can be used at the root depth.Here is a fiddle with both of these examples outlined.
I believe the ideal solution for this would be to keep the depth all in the same context. As an example, this would be loop:
And this a single
The text was updated successfully, but these errors were encountered: