i'、次のコードが示すように、ocLazyLoad で angular ui ルーティングを使用して、選択された統計に従って付録ファイルをロードします。
私の問題は:
新しい状態をロードして更新をクリックすると、工場が初期化されないことがあります-コントローラーを初期化する前にファイルが完全にロードされていないためだと思います-
また、同じocLazyLoad関数ですべてのファイルをマージして使用しようとしましたが、機能しserie : trueませんでした
それはocLazyLoadの正しい使い方ですか?
私は次のモジュールを持っています
  angular.module('app', [ "oc.lazyLoad"]);
  angular.module("app.inventory", []);
  angular.module("app.sales", []);
そしてこれがルーティングです
.state("invoicesAddEdit", {
          url: "/invoice/:invoiceId",
          templateUrl: "app/components/sales/invoice/views/invoiceAddEdit.view.html",
          controller: "InvoiceAddEditController",
          resolve: {
              invoiceId: ['$stateParams', function ($stateParams) {
                  return $stateParams.invoiceId;
              }],
              settings: ['$ocLazyLoad', function ($ocLazyLoad) {
                  return $ocLazyLoad.load({
                      name: "app.settings",
                      files: [
                              "app/components/settings/settings.module.js",
                              "app/components/settings/currency/services/currency.factory.js",
                              "app/components/settings/deliveryMan/services/deliveryMan.factory.js",
                      ]
                  })
              }],
              inventory: ['$ocLazyLoad', function ($ocLazyLoad) {
                  return $ocLazyLoad.load({
                      name: "app.inventory",
                      files: [
                              "app/components/inventory/inventory.module.js",
                              "app/components/inventory/customer/services/customer.factory.js",
                              "app/components/inventory/store/services/store.factory.js",
                              "app/components/inventory/product/services/product.factory.js",
                      ]
                  })
              }],
              purchasing: ['$ocLazyLoad', function ($ocLazyLoad) {
                  return $ocLazyLoad.load({
                      name: "app.purchasing",
                      files: [
                              "app/components/purchasing/purchasing.module.js",
                              "app/components/purchasing/purchaseOrder/services/purchaseOrder.factory.js",
                      ]
                  })
              }],
              sales: ['$ocLazyLoad', function ($ocLazyLoad) {
                  return $ocLazyLoad.load({
                      name: "app.sales",
                      files: [
                              "app/components/sales/sales.module.js",
                              "app/components/sales/representative/services/representative.factory.js",
                              "app/components/sales/invoice/services/invoice.factory.js",
                              "app/components/sales/invoice/controllers/invoiceAddEdit.controller.js",
                      ]
                  })
              }],
          }
      })