angular-ui / ui-codemirror

This directive allows you to add CodeMirror to your textarea elements.
http://angular-ui.github.io/ui-codemirror
MIT License
378 stars 193 forks source link

[RFR] Fix Strict DI issues and remove ngAnnotate #127

Open jpetitcolas opened 8 years ago

jpetitcolas commented 8 years ago

This PR aims to solve an issue when importing this module in a Strict Dependency Injection environment. Indeed, using current version, installed with npm, we get the following Angular error:

Error: [$injector:strictdi] http://errors.angularjs.org/1.4.12/$injector/strictdi?p0=uiCodemirrorDirective

Bower version is not impacted as ng-annotate plugin seems to be used in this case.

As source file is already compatible with strict DI, I also removed the obsolete ng-annotate plugin.

jpetitcolas commented 8 years ago

Fixes #106.

genu commented 7 years ago

Not sure why removing ng-annotate is the solution here. I figure it should work with ng-annotate as expected in npm as long as the main file points to the dist version. #138 Attempts to make the same change.

Also, why aren't these PRs reviewed? Looks like this hasn't been touched for a year.

jpetitcolas commented 7 years ago

@genu: the main fix is here.

Removing ng-annotate has been done because it is not required anymore, as code is compatible with strict DI. But that's a side-effect of the fix.

postama commented 6 years ago

What is the status of this PR. It has been almost a year and this fix is necessary for us. Let me know if there is anything that needs to be done to allow it to get merged in.

jpetitcolas commented 6 years ago

Same here. We got a production project using my fork as a dependency. That's not really comfortable. :)