Say we have  a transclude directive <foo> (with iso scope) wrapping an 
input:

<div ng-controller="MainCtrl">
 <form name="mainForm">
    <foo><input ng-model="myInput" name="myInput" type="text"></foo>
 </form>
</div>

where <foo> has the following template:

<div ng-form="fooForm">
<div ng-transclude></div>
<button ng-click="saveChanges()">ok</button>
<button ng-click="cancelChanges()">cancel</button>
</div>

NgModelController takes a scope as constructor param. Does that mean that 
there will/can be multiple instances of NgModelController associated with 
transcluded <input>:

   1. one at $scope.mainForm.myInput (using $scope from MainCtrl)
      1. mainForm will also be accessible to transcluded scope (via 
      prototypal inheritance)
   2. another at scope.fooForm.myInput (using isolate scope from <foo>) 


...and if so, can those two ctrls at times have unequal $viewValue and 
$modelValue values - since the latter is derived from NgModelController's 
scope?

-nikita

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to