Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with injection of restangular

I have an error injection when i put this code :

    /* start */
    var app = angular.module('app', ['ngRoute', 'Restangular', 'ngStorage']);

   /* first controller */
    app.controller('RSSFBCtrl', function($scope, Restangular) {

    /*(here my code for get a facebook json)*/

    });

error :

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.0-beta.7/$injector/modulerr?p0=app&p1=Error…arjs.org%2F1.3.0-beta.7%2F%24injector%2Fmodulerr%3Fp0%3DRestangular%26p1%3...<omitted>...6) 

what's wrong ? syntax error ? :/ restangular is correctly added with script tag

like image 590
zelocalhost Avatar asked Aug 15 '26 10:08

zelocalhost


1 Answers

Try lower case "restangular" in the module declaration (keep upper case in the controller). Sample code here... https://github.com/mgonto/restangular#quick-configuration-for-lazy-readers

like image 131
user3800279 Avatar answered Aug 17 '26 08:08

user3800279



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!