-
Notifications
You must be signed in to change notification settings - Fork 6.7k
bug(typeahead) inside modal #972
Comments
The new $modal templates uses transclusion to add the modal content to the dialog. Looking at the transclusion documentation and some stackoverflow answers to related questions you should be able to have your two way binding work using something like: 'ngModel="$parent.yourproperty"'. |
Have a look at #969 and the mods I made to the Modal module, they solved all these kinds of problems for me. |
Yes, this is essentially the same issue as #969 so let's move the discussion in there. I can see how this can be confusing so we need to improve. For now the best option is to assure that there is "dot" in the ngModel expression: @AGiorgetti using $parent is not really advisable in this case as it might easily break as soon as you insert any scope-creating directive (ngIf, ngSwitch, ngInclude etc.). |
Sorry, I'm not sure I got the answer to part 2 of my question: I was under the impression (from ng-ui-b 0.4.0 and ng 1.1.5) that |
This can stay closed, and I'll follow 981 which someone else opened. |
0.6.0 and 1.2.0.rc2
I had this working with 0.4.0, there were some other issues preventing it from working with 0.5.0, but haven't been able to figure it out on the latest code. Am I missing something?
There are two issues:
typeahead
ng-model
value in the modal getting returned to the ModalDemoCtrl from the ModalInstanceCtrl?typeahead
input after selection would have been thelabel
, not theselect
(i.e. "Joe" instead of 1)Here's the Plunkr
The text was updated successfully, but these errors were encountered: