Skip to content Skip to sidebar Skip to footer

Restangular: Error: Unknown Provider: RestangularProvider <- Restangular

I'm trying to use restangular as an adapter for rails rest api, but i can't make it work properly. I've downloaded the latest version and put the file in vendor/assets/javascripts

Solution 1:

As per my comment, you're defining the module twice, the second time it overrides your restangular inclusion.


Solution 2:

The second angular.module('angularApp'... overwrites the first one erasing the rectangular dependency.

If you need to reference the angularApp module, do it without brackets, like this:

var App = angular.module('angularApp')
  • With brackets -> module creation
  • Without brackets -> module reference

Post a Comment for "Restangular: Error: Unknown Provider: RestangularProvider <- Restangular"