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

Supporting two bindonce "scopes" at a time #95

Open
funkjunky opened this issue Aug 14, 2014 · 2 comments
Open

Supporting two bindonce "scopes" at a time #95

funkjunky opened this issue Aug 14, 2014 · 2 comments

Comments

@funkjunky
Copy link

bindonce works by first specifying what object you are doing your bind-once operations on.

For example you specifying bind="myobject", then later use bo-text="myobject.name"
My issue is that I have two different "scopes" in a nested ng-repeat.

I tried using bindonce="firstListItem", then bindonce="secondListItem", then in the following html I have ng-if="firstListItem.isTrue", then bo-text="secondListItem.value".

I need some way of binding more than one "scope"

@Pasvaz
Copy link
Owner

Pasvaz commented Aug 14, 2014

This feature is actually already implemented but it is undocumented at the moment. Try using bo-name="firstListItem" as attribute for the bindonce controller and bo-parent="firstListItem" as attribute for the bo-* directive

@funkjunky
Copy link
Author

What about secondListItem?
Thanks, I'm excited to get your response, but I'm also confused by it =P

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

No branches or pull requests

2 participants