我正在根據功能對我的electronjs(angular,mysql)應用程序文件進行分組,例如,我在開發庫存系統,這就是我如何組織我的文件:我的電子網絡應用程序中的每個功能的app.js文件
/app
/scripts
/categories
-- app.js
-- category.html
-- categoryController.js
-- categoryService.js (MySQL data access procedures)
/brands
-- app.js
-- brands.html
-- brandsController.js
-- brandsService.js (MySQL data access procedures)
/unitsofmeasure
-- app.js
-- unitsofmeasure.html
-- unitsofmeasureController.js
-- unitsofmeasureService.js (MySQL data access procedures)
/products
/suppliers
....
等等每個功能。
裏面每個app.js文件(例如對於類):
(function() {
'use strict';
var _templateBase = './scripts';
angular.module('app', [
'ngRoute',
'ngMaterial',
'ngAnimate'
])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: _templateBase + '/category/category.html' ,
controller: 'categoryController',
controllerAs: '_ctrl'
});
$routeProvider.otherwise({ redirectTo: '/' });
}
]) ;
})();
我的問題:是否確定有幾個app.js文件的每個功能我的應用程序將有?
我也在開發一個使用Electron的類似庫存系統。你有任何參考項目的網址嗎? – uncivilized