I have a condition in which I have input fields in the listing grid, and I have one directive, now I want to send the value to this directive, whatever the input value ... up to this point it works fine, but now, when I try to change the value from the input field of the directive, it does not update the input field of the list grid for which the value for the directive is set.
Here is a working plnkr, let me know what I'm doing wrong.
http://plnkr.co/edit/DZdN4itTNccVsuBEJahr?p=preview
My controllerand directivethe code looks like -
var myApp = angular.module('myApp', []);
myApp.controller('mainCtrl', function(){
var vm = this;
vm.fordirective = '';
vm.list = [
{id: "1", name: 'Test 1', age: 35},
{id: "2", name: 'Test 2', age: 36},
{id: "3", name: 'Test 3', age: 37},
{id: "4", name: 'Test 4', age: 38},
];
})
myApp.directive('testdir', function(){
return {
restrict: 'EA',
scope: {
directivevalue: "="
},
templateUrl: 'dirtemplate.html',
link: function(scope, elem, attrs) {
}
};
})