1

I wish to inject two dependences in my module, but angular not accepts this very well , someone can help-me? i´m beginner in angular.

  var app = angular.module('aplication', ['infinite-scroll','ngAnimate']);

sequence of scripts. enter image description here

error: enter image description here

3
  • what is the issue Commented Dec 9, 2016 at 1:56
  • Uncaught Error: [$injector:unpr] Commented Dec 9, 2016 at 1:58
  • Your module is called aplication ? have you corrected this spelling? Commented Dec 9, 2016 at 2:31

2 Answers 2

2

Make sure you have loaded the references,

  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.js"></script>
  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-animate.js"></script>
  <script src="app.js"></script>
  <script src="infinite-scroll.js"></script>

And then,

app = angular.module('application', ['ngAnimate', 'infiniteScroll']);

Demo

Sign up to request clarification or add additional context in comments.

4 Comments

my sequence is wrong? why i need to put the app.js in the middle of angular-animate and infinite scroll? that is my bug?
@IgorMonteiro no it is not an issue! where are you loading the app.js?
no I don´t but I guess that two scripts not working fine together.. tks
1

I've changed my script to:

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.js"></script> 

and works fine!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.