New to AngularJS, using 1.4.7

13 views
Skip to first unread message

Jeff Ziegler

unread,
May 20, 2024, 1:22:12 PMMay 20
to Angular and AngularJS discussion
I have a <tabs> with 2 pane.  When you click on the 2nd tab it broadcast 1 event - $scope.$broadcast('PaneSelected', pane).  The problem I am having is the listener gets called 2 times with different $scope.$id.  

The 1st call, $scope.$id = 35 & $scope.$parent.$id = 9.  The 2nd time, $scope.$id = 36 & $scope.$parent.$id = 35.  Is my only option to add a check bases on $scope.$parent.$id ==  ($scope.$id-1)?

<div class="row program-group-control">
    <div class="content program-groups">
        <div class="details">
            <div id="program-groups" class="container">
<tabs id="mainTabs">
<pane title="Program Groups" show="true">
<div ui-view="programGroup"></div>
</pane>
<pane title="Services" show="true">
<div ui-view="service"></div>
</pane>
</tabs>
            </div>
        </div>
    </div>
</div>
Reply all
Reply to author
Forward
0 new messages