-
Notifications
You must be signed in to change notification settings - Fork 19
Issues with ng-if and inputs #22
Comments
Thanks for the report I'll check it out. |
We had a similar issue, but it seems to be fixed in a previous version (0.1.2). |
It seems to happen from version |
In fact using multi-transclusion in this way won't work: we perform the transclusion eagerly, not upon each occurrence of |
Hi zachsnow, <div some-directive decl-transclude> //grabs the content of the element in the compile phase
<div decl-transclude-as="foo">bar</div> //declares a transclude with a name - will be grabbed by decl-transclude
....
</div> //inside some-directive
<div class="some-directive">
...
<div decl-transclude-from="foo"></div> //compiles the grabbed content in the appropriate scope
....
</div> |
Hey @sloosch, very cool, I look forward to checking it out! |
When using ng-if in combination with multi-transclude weird things can happen with inputs. I created a fiddle to reproduce the issue:
http://jsfiddle.net/v9kvfo73/3/
The first label / input is the one with multi-transclude, the second one is with the standard ng-transclude.
Both have a div with an ng-if around the transcluded block.
When updating one of the inputs I expect the form to become dirty and the save button should be enabled. This works as expected for the standard ng-transclude, but not for the one inside the multi-transcluded block. Updating the first text box doesn't even clear the pristine state of the text box itself.
However updating the second text box will also update the first text box. So it seems the binding has become one-way ..
The text was updated successfully, but these errors were encountered: