Transform account state to component.
This commit is contained in:
parent
83d7e61875
commit
330ed6b926
@ -27,6 +27,8 @@ var ngResource = require('angular-resource'),
|
|||||||
ngUiNotification = require('angular-ui-notification'),
|
ngUiNotification = require('angular-ui-notification'),
|
||||||
ngStrap = require('angular-strap');
|
ngStrap = require('angular-strap');
|
||||||
|
|
||||||
|
var accountsTmpl = require('./accounts.html');
|
||||||
|
|
||||||
import { AccountBalancesFactory } from './accountBalances.factory';
|
import { AccountBalancesFactory } from './accountBalances.factory';
|
||||||
import { AccountService } from './account.service';
|
import { AccountService } from './account.service';
|
||||||
import { AccountComponent } from './account.component';
|
import { AccountComponent } from './account.component';
|
||||||
@ -42,6 +44,10 @@ export default angular.module('accountant.accounts', [
|
|||||||
|
|
||||||
.factory('AccountService', downgradeInjectable(AccountService))
|
.factory('AccountService', downgradeInjectable(AccountService))
|
||||||
|
|
||||||
.controller('AccountController', AccountComponent)
|
.component('accountList', {
|
||||||
|
controller: AccountComponent,
|
||||||
|
controllerAs: 'accountsCtrl',
|
||||||
|
templateUrl: accountsTmpl
|
||||||
|
})
|
||||||
|
|
||||||
.name;
|
.name;
|
||||||
|
@ -29,9 +29,7 @@ export default function AppConfig($uiRouterProvider) {
|
|||||||
$stateRegistry.register({
|
$stateRegistry.register({
|
||||||
name: 'accounts',
|
name: 'accounts',
|
||||||
url: '/accounts',
|
url: '/accounts',
|
||||||
templateUrl: accountsTmpl,
|
component: 'accountList',
|
||||||
controller: 'AccountController',
|
|
||||||
controllerAs: 'accountsCtrl'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const $urlService = $uiRouterProvider.urlService;
|
const $urlService = $uiRouterProvider.urlService;
|
||||||
|
Loading…
Reference in New Issue
Block a user