JSFiddle - React, Tailwind, and code Playground
by jarnal
HTML
<div ng-app="">
<span ng-init="count=0; larray=[1,2,3]" >count: {{count}}</span>
<ul>
<li ng-repeat="n in larray"> <button ng-click="count = count + n" > {{n}} </button> innercount:{{count}}
<button ng-click="$parent.count = count + n" > IncrementParentCount{{n}} </button> <br>
<ul>
<li ng-repeat="n2 in larray">
<button ng-click="count = count + n2" > {{n2}} </button> Innermostcount:{{count}}
<button ng-click="$parent.count = count + n2" > IncrementParentCount{{n2}} </button>
<button ng-click="$parent.count = count + n + n2" > IncrementParentCount by {{n2}} plus {{n}} </button>
</li>
</ul>
</li>
</ul>
</div>