Attach a model to your search input:
<input type="search" ng-model="search" />
Add two-way binding for this model on your directives' scope and use it to filter your ng-repeat items:
<root items="data" search="search"></root>
<root items="data2" search="search"></root>
and
app.directive('root',function(){
return {
scope:{
items:'=',
search:'='
},
restrict:'AE',
template:'<ul><li>Item<ul><li ng-repeat="item in items | filter:search"><show-item mo="item"></show-item>l</li></ul></li></ul>'
};
});