Would actually list the accounts in web-ui if it wasn't for cross-site-protection #316

This commit is contained in:
Thomas R. Koll 2016-01-12 00:16:34 +01:00
parent 88d8f975ed
commit 2e625fdaee
3 changed files with 7 additions and 6 deletions

View File

@ -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>

View File

@ -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",
@ -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;
});
});

View File

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