I'm having trouble binding a controller array with a directive :
Markup :
<custom-directive item="tag" selectedItems="selectedArray" ng-repeat="tag in tags"></custom-directive>
Controller :
$scope.selectedArray= [];
Directive :
scope: {
item:"=",
selectedItems:"="
},
controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) {
//Undefined
console.log($scope.selectedItems);
}
The binding for item works fine, what am I doing wrong for selectedItems ?
Thanks