Code Monkey home page Code Monkey logo

Comments (4)

mgonto avatar mgonto commented on July 19, 2024

Hey,

The only place where I call a module function is on the first line of code:

var module = angular.module('restangular', ['ngResource']);

So, my question is, are you including angular before Restangular?? I've tests for Restangular so maybe checking out my karma.conf file can help you out.

https://github.com/mgonto/restangular/blob/master/karma.conf.js

But it's really weird because your code must have an angular.module as well, so it's weird that for Restangular that doesn't work. If you add some other JS doing angular.module in the same place, does it fail as well?

from restangular.

mgonto avatar mgonto commented on July 19, 2024

And angular.module should be a function, it's the one we use to register and get modules.

from restangular.

chrix75 avatar chrix75 commented on July 19, 2024

Thanks for your reply,

I've understood why I'd got this issue.

In my test spec files, I imported modules like that: beforeEach(module('myModule'));

But I use restangular, I must replace the module call by angular.mock.module. So, I must code:

beforeEach(angular.mock.module('myModule'));

Now, all my tests work fine :)

Thanks again :)

Chris

Le 22 mai 2013 à 17:26, Martin Gontovnikas [email protected] a écrit :

Hey,

The only place where I call a module function is on the first line of code:

var module = angular.module('restangular', ['ngResource']);
So, my question is, are you including angular before Restangular?? I've tests for Restangular so maybe checking out my karma.conf file can help you out.

https://github.com/mgonto/restangular/blob/master/karma.conf.js

But it's really weird because your code must have an angular.module as well, so it's weird that for Restangular that doesn't work. If you add some other JS doing angular.module in the same place, does it fail as well?


Reply to this email directly or view it on GitHub.

from restangular.

mgonto avatar mgonto commented on July 19, 2024

Great to know you could solve it!!!

Closing the issue.

from restangular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.