Typescript conversion.

This commit is contained in:
Alexis Lahouze 2017-07-13 21:37:47 +02:00
parent bda2c90e3d
commit 1e94109910
4 changed files with 9 additions and 7 deletions

View File

@ -1,4 +1,4 @@
module.exports = function($resourceProvider) {
export function AccountConfig($resourceProvider) {
// Keep trailing slashes to avoid redirect by flask.
$resourceProvider.defaults.stripTrailingSlashes = false;
};

View File

@ -1,4 +1,4 @@
module.exports = function($resource) {
export function AccountFactory($resource) {
return $resource(
'/api/account/:id', {
id: '@id'

View File

@ -1,4 +1,4 @@
module.exports = function($resource) {
export function AccountBalancesFactory($resource) {
return $resource(
'/api/account/:id/balances', {
id: '@id'

View File

@ -17,17 +17,19 @@
*/
/* jshint node: true */
'use strict';
var angular = require('angular');
//declare var angular: angular.IAngularStatic;
import { downgradeInjectable } from '@angular/upgrade/static';
var ngResource = require('angular-resource'),
ngMessages = require('angular-messages'),
ngUiNotification = require('angular-ui-notification'),
ngStrap = require('angular-strap');
var AccountFactory = require('./account.factory');
var AccountBalancesFactory = require('./accountBalances.factory');
var AccountConfig = require('./account.config');
import { AccountFactory } from './account.factory';
import { AccountBalancesFactory } from './accountBalances.factory';
import { AccountConfig } from './account.config';
import { AccountController } from './account.controller';
export default angular.module('accountant.accounts', [