You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using textAngular inside ng-repeat with same name attribute value? #240
Hi there,
Thanks a lot for the directive. I am trying to use angularjs validation with textAngular but unfortunately I have run into a problem. I have an ng-repeat which repeats an ng-form inside of which I have a textAngular element. However the ng-repeat array can't have more than one element because I get the error "textAngular Error: An editor with the name already exists".I was wondering if there was a way to fix this problem. Thanks a lot for your help.
Hi thanks for the reply. I think the error message is fine, it explains the problem pretty well. I thought this was an issue since the error was coming from angularjs and not textAngular but I guess I was wrong there. Maybe a note in the docs regarding this feature would be helpful in the future? Thanks for the possible solutions.
Activity
SimeonC commentedon Jul 14, 2014
As the error suggests each textAngular directive requires a unique name attribute. There are two solutions to this:
<div text-angular ng-model='item.Model' name='textAngularEditor{{$index}}'></div>As you're using it inside an ng-form I'm assuming you want to be doing validation so you'll probably want to use option 2.
To help us improve textAngular what would a better error message have been?
yulric commentedon Jul 15, 2014
Hi thanks for the reply. I think the error message is fine, it explains the problem pretty well. I thought this was an issue since the error was coming from angularjs and not textAngular but I guess I was wrong there. Maybe a note in the docs regarding this feature would be helpful in the future? Thanks for the possible solutions.
pelepelin commentedon Nov 10, 2015
Can't this limitation be removed?