Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

encodeUriSegment is not a function

Angular returns to console error

encodeUriSegment is not a function

it's happen when I tried call get function from angular-resource in my own controller. It's look like angular-resource can't find this one function, but it exist in angular.js file. I installed angular-resource by bower. I have everyone file path which i need in index.html.

full error message:

angular.js:13920 TypeError: [horoskopy_App Error] encodeUriSegment is not a function
    at http://localhost:3000/bower_components/angular-resource/angular-resource.js:573:30
like image 831
Maciej Avatar asked Aug 30 '16 11:08

Maciej


1 Answers

It's likely that you have a version conflict in your source. I had the same issue and found that I was using angular-resource 1.5.9 and angular 1.6. Once I had both on the same version release the issue resolved.

like image 185
John Babb Avatar answered Sep 21 '22 23:09

John Babb