Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unknown provider: eProvider <- e <- textAngularDirective #1

Closed
Dexter-C opened this issue Oct 11, 2013 · 11 comments
Closed

Error: Unknown provider: eProvider <- e <- textAngularDirective #1

Dexter-C opened this issue Oct 11, 2013 · 11 comments
Labels

Comments

@Dexter-C
Copy link

I'm using angular 1.0.8 , when I inject the textAngular in to my main.js there is error:

 Error: Unknown provider: eProvider <- e <- textAngularDirective

any idea why?

@fraywing
Copy link
Collaborator

Are you by chance using the minified version or are you using the development version?

@Dexter-C
Copy link
Author

I'm using the minified version, I tried the development version too, and I got another error:

Error: Unknown provider: $sceProvider <- $sce <- textAngularDirective

@fraywing
Copy link
Collaborator

Yep! That's a bug. I totally forgot that the minification process shrinks the dependencies down to unrecognizable forms. $sce isn't included in 1.0.8. That's why you are running into that issue. I'll get fix it right away. Thanks for the heads up!

Btw Contributions are always welcome :-)

@Dexter-C
Copy link
Author

I think you should add the "angular support version " to the doc. any way thanks for the reply

@fraywing
Copy link
Collaborator

Done and done. The minfied version works now. If you can include the $sce module, it will work. It's shipped with $sce default "on" in Angular 1.2.x

@Dexter-C
Copy link
Author

its working perfectly, but there is one thing : how to dynamically set the html, I use the normal textarea for short input when user open the full writer mode then the editor will show up, however I need the content of the normal textarea to be the initial html ,how can I do that.

I already tried

 scope.textAngularOpts.textAngularEditors.writer.html = scope.post.content;

it wont work!

@fraywing
Copy link
Collaborator

I'm going to get back to you on this one, I'll have to find a way to allow the setting of the model without an infinite $digest loop occurring.

@fraywing
Copy link
Collaborator

Alrighty, I updated textAngular. You should not be able to do what you are wanting. All you have to do, is on your text-editor, make it share the same model as your textAngular instance like:

<textarea ng-model='textAngularOpts.textAngularEditors.myTextAngularInstance.html'></textarea>

Let me know how it goes!

@Dexter-C
Copy link
Author

nice, it work perfectly! thanks

@bakkou
Copy link

bakkou commented Nov 29, 2013

Hi @fraywing thank you for this wonderful module, i'm on angularjs v1.0.6 and i have the $sce error how I solve the problem without changing the version. thank you

@SimeonC
Copy link
Collaborator

SimeonC commented Nov 29, 2013

Hi @bakkou-badri from memory the code is that if you don't have the ngSanitize module included it won't use $sce. As above $sce isn't included in stable builds of angular below 1.2.2.

Apart from that you could try editing the source code manually, but I can't guarantee that will work!

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

No branches or pull requests

4 participants