zachsnow / ng-multi-transclude

ng-multi-transclude
MIT License
79 stars 19 forks source link

ng-required does not work in form with transcluded content #39

Open usarskyy opened 8 years ago

usarskyy commented 8 years ago

Hi everyone,

I have a form that contains transcluded fields:


<form name="form">
<div ng-multi-transclude="content">
<!-- here a few text inputs get injected -->
</div>
</form>

Each of the text inputs has ng-pattern and ng-required validation. If user enters wrong text ng-pattern sets form to invalid state like expected. But when user removes text ng-required, form remains valid. With non-transcluded form ng-required behaves as expected.

Did somebody experience this kind of issues?

zachsnow commented 8 years ago

Hey there, this is essentially related to a known issue with multi-transclusion as implemented by this library (trying to hook into "native" AngularJS transclusion). With no good fix in mind your best choice is to use AngularJS 1.5 (as multi-transclusion is now supported directly by AngularJS). Cheers!

usarskyy commented 8 years ago

Thank you for a quick response!

Ok, then I will have to find another workaround. Unfortunately we cannot currently migrate to Angular 1.5 :(