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'),
|
||||
ngStrap = require('angular-strap');
|
||||
|
||||
var accountsTmpl = require('./accounts.html');
|
||||
|
||||
import { AccountBalancesFactory } from './accountBalances.factory';
|
||||
import { AccountService } from './account.service';
|
||||
import { AccountComponent } from './account.component';
|
||||
@ -42,6 +44,10 @@ export default angular.module('accountant.accounts', [
|
||||
|
||||
.factory('AccountService', downgradeInjectable(AccountService))
|
||||
|
||||
.controller('AccountController', AccountComponent)
|
||||
.component('accountList', {
|
||||
controller: AccountComponent,
|
||||
controllerAs: 'accountsCtrl',
|
||||
templateUrl: accountsTmpl
|
||||
})
|
||||
|
||||
.name;
|
||||
|
@ -29,9 +29,7 @@ export default function AppConfig($uiRouterProvider) {
|
||||
$stateRegistry.register({
|
||||
name: 'accounts',
|
||||
url: '/accounts',
|
||||
templateUrl: accountsTmpl,
|
||||
controller: 'AccountController',
|
||||
controllerAs: 'accountsCtrl'
|
||||
component: 'accountList',
|
||||
});
|
||||
|
||||
const $urlService = $uiRouterProvider.urlService;
|
||||
|
Loading…
Reference in New Issue
Block a user