Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.
This repository was archived by the owner on May 25, 2019. It is now read-only.

Unknown Provider error when using minified ui-codemirror.js #110

Open
@patlaundy

Description

@patlaundy

Hi,
When using the ui-codemirror directive in production (bundled and minified using ASP.NET MVC) I get the following error:

Unknown provider: nProvider <- n <- uiCodemirrorDirective

This is caused by the dependency uiCodemirrorDirective (on line 13 of ui-codemirror.js) is minified to the character 'n' and of course AngularJS does not know what to inject in.

The fix is very simple.
on line 8 of ui-codemirror.js simply provide an array which states the required dependencies as strings:
.directive('uiCodemirror', ['$timeout', 'uiCodemirrorConfig', uiCodemirrorDirective]);

Cheers

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