angularjs - Get controller from angular scope -


i have directive structure this

parent  |-----wrapper---|                  |----direct 1                  |----direct 2                  |----direct 3                  |----direct 4 

i want access value directive 3 has. plan use shared scope on parent , traverse child -

.directive('readerdirective',['$timeout',function($timeout){          return {            restrict : 'a',            link:function(scope, elm, attrs){              var elemdire = elm.find('[direct3]');               var direscope = angular.element(elemdire).scope();               direscope.$watch('value',function(){                console.log(direscope.value);              });            }          };        }]) 

but unable beyond wrapper. can access wrapper scope cant access child directives.

i want access direct 3's controller. possible ?

i have no control on wrapper , child extrenal angular plugin.

i find highly unlikely can't modify/overwrite wrapper have considered using $rootscope share values?

alternatively if can find dom element can lookup scope via angular.element(element_selector).scope()


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -