The problem lies in the value your passing to your taskform directive. You are only passing tab.tasks where as tab.tabFriends is a different array of objects.
You really need to reconstruct how you directive is made. You are assigning $scope.tabs inside your directive where there is no guarantee that where it will be used will have that value. You should divide your directive in to a controller: function() and a linker: function() the latter being for the initialization of the directive.
If you want to find a really awesome example of directives with controllers and linker functions look in the angularjs javascript itself for the ng-model directive. It will give you a really good idea how it should be structured!