How to fix this error

279 views
Skip to first unread message

Priya Bose

unread,
Mar 25, 2014, 2:28:58 AM3/25/14
to ang...@googlegroups.com
hi,
   Pls need your help !

    When i tried to use $sce in my controller function i got the below mentioned error  in my console..!!
  My code is  like this
 function checkOutCtrl($scope,$http,$sce)
{

}
 
Error: Unknown provider: $sceProvider <- $sce createInjector/providerInjector<@http://localhost/example/js//vendors/angular.js:2734 getService@http://localhost/example/media/example/assets/vendors/angular.js:2862 createInjector/instanceCache.$injector<@http://localhost/example/media/example/assets/vendors/angular.js:2739 getService@http://localhost/example/media/example/assets/vendors/angular.js:2862 invoke@http://localhost/example/media/example/assets/vendors/angular.js:2880 instantiate@http://localhost/example/media/example/assets/vendors/angular.js:2914 $ControllerProvider/this.$get</<@http://localhost/example/media/example/assets/vendors/angular.js:4805 $CompileProvider/this.$get</applyDirectivesToNode/nodeLinkFn/<@http://localhost/example/media/example/assets/vendors/angular.js:4384 forEach@http://localhost/example/media/example/assets/vendors/angular.js:137 nodeLinkFn@http://localhost/example/js/assets/vendors/angular.js:4369

Thanks in Advance

Justin Walsh

unread,
Mar 25, 2014, 3:24:28 AM3/25/14
to ang...@googlegroups.com
Which version of angularjs are you using?

(A plunkr would also help)

Priya Bose

unread,
Mar 26, 2014, 12:23:00 AM3/26/14
to ang...@googlegroups.com
Hi Justin ,
            Thanks for your kind reply,am using version 1.0.7. sorry  I dont have any pluker or fiddle for your reference

Justin Walsh

unread,
Mar 26, 2014, 3:19:59 AM3/26/14
to ang...@googlegroups.com
I could be wrong, but I don't believe the $sce service existed in this version of angular.

I checked here: http://code.angularjs.org/1.0.7/docs/api  and I can't find it.
Reply all
Reply to author
Forward
0 new messages