bindonce icon indicating copy to clipboard operation
bindonce copied to clipboard

Supporting two bindonce "scopes" at a time

Open funkjunky opened this issue 11 years ago • 2 comments

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"

funkjunky avatar Aug 14 '14 15:08 funkjunky

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

Pasvaz avatar Aug 14 '14 16:08 Pasvaz

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

funkjunky avatar Aug 14 '14 18:08 funkjunky