Skip to content

Commit

Permalink
Would actually list the accounts in web-ui if it wasn't for cross-sit…
Browse files Browse the repository at this point in the history
…e-protection simonmichael#316
  • Loading branch information
TomK32 committed Jan 12, 2016
1 parent 88d8f97 commit 2e625fd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion hledger-api/client/accounts/view.html
@@ -1,7 +1,9 @@
<div ng-controller="AccountsController as accountsList">
<h2>Accounts</h2>
Search: <input ng-model="query"/>
<ul class="unstyled">
<li ng-repeat="account in accountsList.acocunts">
{{accountsList.accounts}}
<li ng-repeat="account in accounts | filter: query">
<a href="#/accounts/{{account.name}}/journal">{{account.name}}</a>
<span class="balance">{{account.balance}}</span>
</li>
Expand Down
6 changes: 2 additions & 4 deletions hledger-api/client/hledger-client.js
Expand Up @@ -8,9 +8,7 @@ hledger.config(function($stateProvider, $urlRouterProvider) {
.state('accounts', {
url: "/accounts",
templateUrl: "accounts/view.html",
controller: function($scope) {
$scope.accounts = ["A", "List", "Of", "Items"];
}
controller: 'AccountsController'
})
.state('help', {
url: "/help",
Expand All @@ -24,7 +22,7 @@ hledger.factory('Journal', function($resource) {

hledger.controller("JournalController", function($scope, Journal) {
Journal.query(function(data) {
$scope.journals = data;
$scope.journal = data;
});
});

Expand Down
@@ -1,3 +1,4 @@
<div ng-controller="JournalController as journal">
{{journal.account.name}}
{{journal.name}}
</div>

0 comments on commit 2e625fd

Please sign in to comment.