Skip to content
This repository has been 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 opened this issue Sep 15, 2015 · 8 comments
Open

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

patlaundy opened this issue Sep 15, 2015 · 8 comments

Comments

@patlaundy
Copy link

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

@sim51
Copy link

sim51 commented Oct 14, 2015

👍

@legend80s
Copy link

@Patrix2001 would you please make a pull request?

@SpinLock79
Copy link

It is really helpful! Thank you!

@Noppey
Copy link

Noppey commented Jan 5, 2017

Still not fixed (?)

crittermike added a commit to crittermike/ui-codemirror that referenced this issue Dec 2, 2017
crittermike added a commit to crittermike/shortkeys that referenced this issue Dec 2, 2017
@crittermike
Copy link

FWIW, I forked the repo and added the fix mentioned in this issue. See above referenced commits for how to point to the fork instead of the official repo, if you'd like.

@daohodac
Copy link

@mikecrittenden you saved my day.
Is there a chance this added line was in the official repo?

@crittermike
Copy link

@daohodac I don't think so - the official repo hasn't had a commit in almost 3 years.

@cnelissen
Copy link

Having the same problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants