We're updating the issue view to help you get more done. 

ModalStateProvider should not require resolve or parentResolves

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:

1 2 3 4 5 6 7 8 9 10 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:

1 2 3 4 5 6 7 8 9 10 11 12 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

Status

Assignee

Nikodem Graczewski

Reporter

Łukasz Lewczyński

Labels

Story Points

2

Time tracking

4h

Components

Sprint

None

Fix versions

Priority

Major