Exports module name instead of module itself.

This commit is contained in:
Alexis Lahouze 2017-07-06 10:35:15 +02:00
parent d7de013954
commit a7f37e88a9
7 changed files with 25 additions and 25 deletions

View File

@ -28,7 +28,7 @@ var ngResource = require('angular-resource'),
var accountFormTmpl = require('./account.form.tmpl.html'),
accountDeleteTmpl = require('./account.delete.tmpl.html');
var accountModule = angular.module('accountant.accounts', [
module.exports = angular.module('accountant.accounts', [
ngResource,
ngMessages,
ngUiBootstrap,
@ -271,6 +271,6 @@ var accountModule = angular.module('accountant.accounts', [
}
};
}
});
})
module.exports = accountModule;
.name;

View File

@ -34,10 +34,10 @@ var accountsTmpl = require('./accounts/accounts.html');
var schedulerTmpl = require('./scheduler/scheduler.html');
var app = angular.module('accountant', [
accountModule.name,
loginModule.name,
operationModule.name,
schedulerModule.name,
accountModule,
loginModule,
operationModule,
schedulerModule,
ngRoute,
])

View File

@ -31,7 +31,7 @@ var loginTmpl = require('./login.tmpl.html');
var base64 = require('base64util');
var loginModule = angular.module('accountant.login', [
module.exports = angular.module('accountant.login', [
ngHttpAuth,
ngStorage,
ngUiBootstrap
@ -153,6 +153,6 @@ var loginModule = angular.module('accountant.login', [
$rootScope.$on('$destroy', function() {
onAuthLoginRequired = angular.noop();
});
});
})
module.exports = loginModule;
.name;

View File

@ -27,8 +27,8 @@ var account = require('../accounts');
var ngResource = require('angular-resource');
var balanceChartModule = angular.module('balanceChartModule', [
account.name,
module.exports = angular.module('balanceChartModule', [
account,
ngResource
])
@ -188,6 +188,6 @@ var balanceChartModule = angular.module('balanceChartModule', [
id: '@id'
}
);
});
})
module.exports = balanceChartModule;
.name;

View File

@ -25,7 +25,7 @@ var angular = require('angular');
var ngResource = require('angular-resource');
var categoryChartModule = angular.module('categoryChartModule', [
module.exports = angular.module('categoryChartModule', [
ngResource
])
@ -132,6 +132,6 @@ var categoryChartModule = angular.module('categoryChartModule', [
id: '@id'
}
);
});
})
module.exports = categoryChartModule;
.name;

View File

@ -34,14 +34,14 @@ var ngResource = require('angular-resource'),
ngUiNotification = require('angular-ui-notification'),
ngStrap = require('angular-strap');
var operationModule = angular.module('accountant.operations', [
module.exports = angular.module('accountant.operations', [
ngResource,
ngMessages,
ngUiBootstrap,
ngUiNotification,
ngStrap,
balanceChartModule.name,
categoryChartModule.name
balanceChartModule,
categoryChartModule
])
.config(function($resourceProvider) {
@ -264,6 +264,6 @@ var operationModule = angular.module('accountant.operations', [
}
};
}
});
})
module.exports = operationModule;
.name;

View File

@ -28,7 +28,7 @@ var ngMessages = require('angular-messages'),
ngUiNotification = require('angular-ui-notification'),
ngStrap = require('angular-strap');
var schedulerModule = angular.module('accountant.scheduler', [
module.exports = angular.module('accountant.scheduler', [
ngMessages,
ngUiBootstrap,
ngUiNotification,
@ -225,6 +225,6 @@ var schedulerModule = angular.module('accountant.scheduler', [
}
};
}
});
})
module.exports = schedulerModule;
.name;