1

I am very new to angular-Js. I am trying to use the bootstrap angular UI as part of my learning I have taken code from https://angular-ui.github.io/bootstrap/.

the accordian module. http://imgur.com/h1IFF0g

But on page load I am getting below error for each accordion component.

VM5120:27 TypeError: $q.resolve is not a function at collapse (ui-bootstrap-tpls-1.3.3.js:66)
at Object.fn (ui-bootstrap-tpls-1.3.3.js:102)
at l.$digest (angular.js:14243)
at l.$apply (angular.js:14506)
at l (angular.js:9659)
at S (angular.js:9849)
at XMLHttpRequest.D.onload (angular.js:9790)

I am declaring dependency in my app.js file as

   var mainApp = angular.module("myApp", ['ngRoute', 'myApp.view1','myApp.view2', 'myApp.login', 'ui.bootstrap']);

I have downloaded the ui-bootstrap-1.3.3.js and included them in my project as below.

<script src = "https://connect.facebook.net/en_US/sdk.js"></script>
<script src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular-route.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-animate.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="ui-bootstrap-1.3.3.js"></script>
<script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-1.3.3.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">

Could someone please guide me in understand where I am doing wrong.

Please let me know if I need to provide any further information.

2
  • don't need both scripts.Second includes all that is in first...plus templates. What version of angular are you using? Commented Jul 5, 2016 at 21:40
  • Thank you for correcting, I am very new to front end. I have updated the post with references I am using. It is 1.3.14 I am using. Commented Jul 5, 2016 at 21:47

1 Answer 1

2

I could resolve it by changing the angular js version to 1.4.3.

https://github.com/angular-ui/bootstrap/issues/5490 helped me.

Thank you!!

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.