mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-29 13:22:27 +03:00
Would actually list the accounts in web-ui if it wasn't for cross-site-protection #316
This commit is contained in:
parent
88d8f975ed
commit
2e625fdaee
@ -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>
|
||||
|
@ -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;
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
<div ng-controller="JournalController as journal">
|
||||
{{journal.account.name}}
|
||||
{{journal.name}}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user