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

Referencing current value as a dot (".") variable. #11

Closed
chrismichaelscott opened this issue Aug 10, 2013 · 1 comment
Closed

Referencing current value as a dot (".") variable. #11

chrismichaelscott opened this issue Aug 10, 2013 · 1 comment
Assignees

Comments

@chrismichaelscott
Copy link
Owner

There are a few instances where this may be required.

Take the example of the following model:

var model = {
    jobIds = [ 12, 54, 102, 297 ]
}

Then the view:

<ul class="bindto-jobIds">
    <li data-bind_each></li>
</ul>

That works fine. Now, what if you want to use an a inside the li with an href. You would need to reference the current value in a variable:

<ul class="bindto-jobIds">
    <li data-bind_each>
        <a href="/jobs/${.}">Run ${.}</a>
    </li>
</ul>

The innerHTML variable (the "Run ${.}") actually works - through I don't think through design - but the attribute variable is not processed.

Making the dot syntax an intentional feature for all cases would be quite useful.

@chrismichaelscott
Copy link
Owner Author

This is fixed in the latest release

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

No branches or pull requests

1 participant