0

Iam using Angular v-accordion plugin https://github.com/LukaszWatroba/v-accordion/blob/master/README.md ..But unable to control opening of the accordion panes from one controller to another using rootScope. Could you please help on this. I have created a plunker for the same http://tinyurl.com/z6t97s4

In my plunker, iam able to open the first and second header in the second controller.Can some one help me to open the first header and second header in first controller from second controller

Thank you!

Krishna
  • 1
  • 6
  • I mean to open first and second headers in the second controller from first controller – Krishna Dec 16 '15 at 01:14
  • This might be helpful: http://stackoverflow.com/questions/13428042/angularjs-access-to-child-scope Basically what you're trying to do is accessing a variable in the child scope from parent, which you can't. – jianweichuah Dec 16 '15 at 01:15
  • You could just do angular.element().scope() on a specific element and it will return the scope object for that element which will include its controller – Binvention Dec 16 '15 at 01:41

1 Answers1

0
angular.element('item').scope() 

will return the scope for that item which will include the scope objects you're looking for. It isn't using root scope but it will return scopes from different controllers

Binvention
  • 1,057
  • 1
  • 8
  • 24