Open diimpp opened 9 years ago
But compiling on the child scope would defeated the purpose of the directive. if you want the child scope you could just use the regular ng-include. Right?
That sounds right, but is it what happens? Directive don't have its own scope, therefore it's adds it to current scope?
I've just recheck with static-include with my fix, without and with ng-include. I've ui-router state with simple controller, that maps to form. For example
$scope.user = {};
And two view htmls, index.html and _form.html, where first one includes _form.html and _form.html contains inputs with ng-model to $scope.user properties
<div class="form-group" show-errors>
<label class="col-sm-2" for="name" translate="user.create.name"></label>
<div class="col-sm-10">
<input id="name"
name="name"
type="text"
class="form-control"
ng-model="user.name"
ng-minLength="4"
ng-maxLength="64"
ng-required="true" />
</div>
</div>
So
I've ng-model and they are not evaluated.
This fixes that.
angular 1.2.28