Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

config provider name is incorrect #230

Open
@jrencz

Description

@jrencz

Name of registered provider is uiMask.Config so in config blocks it has to be referred to as uiMask.ConfigProvider.

This limits the possibilities of accessing it in config blocks to explicit annotation like this:

angular
  .module('myModule')
  .config(['uiMask.ConfigProvider', uiMaskConfigProvider => {
      Object.keys(uiMaskConfigProvider) // ['$get', 'maskDefinitions', 'clearOnBlur'...]
  }])

but an attempt to use implicit annotation (and possibly ng-annotate or its successor babel-plugin-angularjs-annotate) fails:

angular
  .module('myModule')
  .config(uiMaskConfigProvider => {
    'ngInject';

    Object.keys(uiMaskConfigProvider) // ['$get']
  })

To be able to do that uiMask.Config should become uiMaskConfig. But then uiMaskConfig (value) has to be renamed or provider has to produce the value (which I was certain it did, but it turns out that uiMaskConfig and uiMask.Config are 2 distinct DI entities)

I suggest uiMaskConfig should become uiMaskConfigDefaults and uiMask.Config should be renamed to uiMaskConfig.

It's a breaking change, yet one easy to guide the users through.

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