I have directive with isolated scope and two-way data binding.
app.directive('inputField', function() {
return {
restrict: 'E',
require: '^ngModel',
scope: {
data: '=ngModel',
},
template: "<input type='text' ng-model='data' />",
};
});
If I put this directive to page. All works fine. Data in page scope and directive scope is equal.
But if I put directive in ng-repeat, directive not populate data to page scope.
How to resolve this problem?
Here's example of code.