Skip to content

Instantly share code, notes, and snippets.

@brianpetro
Created August 18, 2016 17:19
Show Gist options
  • Save brianpetro/aa67ccbdd03bee7155535dce3194a0e1 to your computer and use it in GitHub Desktop.
Save brianpetro/aa67ccbdd03bee7155535dce3194a0e1 to your computer and use it in GitHub Desktop.
<script type="text/template" id="account-template">
<div class="account-area">
<div class="main-account-area">
<span class="toggle-handler" ng-click="toggleSubAccounts()">
<span ng-if="!subAccountsOpen" class="close"></span>
<span ng-if="subAccountsOpen" class="open"></span>
</span>
<span class="main-account-name">{{account.name}} </span>
<span class="main-account-balance">{{account.balance}}</span>
</div>
<ul class="sub-accounts-area" ng-if="subAccountsOpen">
<li ng-repeat="subAccount in account.subAccounts">
<div class="sub-account-name"> {{subAccount.name}}</div>
<div class="sub-account-balance">{{subAccount.balance}}</div>
</li>
</ul>
</div>
</script>
<body ng-app="myApp">
<div ng-controller="accountsSummaryCtrl" class="summary">
<account name="assetsAccount"></account>
<account name="receivablesAccount"></account>
<account name="debtsAccount"></account>
<account name="equityAccount"></account>
</div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment