Uploaded image for project: 'OpenLMIS General'
  1. OLMIS-5655

ModalStateProvider should not require resolve or parentResolves

    Details

    • Type: Task
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects versions: None
    • Fix versions: 3.6
    • Components: UI
    • Labels:
    • Sprint:
      Team Mind the Gap Sprint 117
    • Story Points:
      2

      Description

      It seems like the ModalStateProvider requires at least an empty resolve map and an empty parentResolves array because when I defined modal state in the following way:

          function routes(modalStateProvider) {
      
              modalStateProvider.state('openlmis.administration.supplyPartners.add', {
                  controller: 'SupplyPartnerAddController',
                  controllerAs: 'vm',
                  templateUrl: 'admin-supply-partner-add/supply-partner-add.html',
                  url: '/new'
              });
      
          }
      

      I got an error message and the following stack:

      Error: [$injector:itkn] Incorrect injection token! Expected service name as string, got undefined
      http://errors.angularjs.org/1.6.6/$injector/itkn?p0=undefined
          at angular.js:116
          at injectionArgs (angular.js:5002)
          at Object.invoke (angular.js:5032)
          at angular-ui-router.js:3389
          at processQueue (angular.js:17051)
          at angular.js:17095
          at Scope.$digest (angular.js:18233)
          at Scope.$apply (angular.js:18531)
          at angular.js:20448
          at completeOutstandingRequest (angular.js:6362)
      

      After adding required fields everything works fine.

      ACC

      • It should be possible to create a modal state without resolve or parentResolves parameters

        Checklists

          Attachments

            Activity

              People

              • Assignee:
                ngraczewski Nikodem Graczewski
                Reporter:
                llewczynski Łukasz Lewczyński
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Time Spent - 3 hours Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - 3 hours Remaining Estimate - 1 hour
                  3h