Skip to content

Throw Error when resolve does not find dependency to inject #469

@frapontillo

Description

@frapontillo

Say I have a factory called Config and there is a state such as:

$stateProvider.state('app', {
  url: '/',
  templateUrl: 'views/main.html',
  controller: 'MainCtrl',
  resolve: {
    config: function(Config) {
      return Config.reloadConfig();
    }
  }
}):

The resolve function of course fails, but no Error is thrown! When the project is minified (which is the only case when you notice something is wrong) finding this error is a pain; I had to go by trial and error through a lot of files to notice this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions