For example I have directive
App.directive('module', function($compile)
{
return {
replace : true,
restrict : 'E',
link: function(scope, iElement, iAttrs)
{
scope.localName = '1';
},
template : '<div> {{ name }} - {{ localName }}</div>',
}
});
At application run function:
App.run(function($rootScope, $location)
{
$rootScope.name = "test";
}
So in this way directive's scope will be same for all directives but this scope will have access to $rootScope:
<module></module>
<module></module>

But if I will make an isolated scope:
App.directive('module', function()
{
return {
replace : true,
restrict : 'E',
link: function(scope, iElement, iAttrs)
{
scope.localName = '1';
},
template : '<div> {{ name }} - {{ localName }}</div>',
scope : {}
}
});
Scopes will be different, but they will be have access to $rootScope.

So I need to isolate the scope of each directive but I need this scope to have access to $rootScope.
Can you help me please?