1

I use jquery-2.0.3.min.js and js/angularjs 1.6.1 from https://angularjs.org It works OK. Now I wanted to add ui bootstrap (http://angular-ui.github.io/bootstrap/). But when I load it i get and error that $.angular.cps is undefined (and it does not load the angular), so I copied the exact header from the example

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular-animate.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular-sanitize.js"></script>
<script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-2.4.0.js"></script>
<script src="example.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

This works (in the demo). But when I add the jQuery

<script src="js/jquery-2.0.3.min.js"></script>

It fails to load the angular It crashes in line 4511 in angular.js:

throw $injectorMinErr('unpr', "Unknown provider: {0}", path.join(' <- '));

The error:

[$injector:unpr] Unknown provider: $routeProvider http://errors.angularjs.org/1.5.8/$injector/unpr?p0=%24routeProvider

4
  • 1
    Possible duplicate of AngularJS and jQuery conflict Commented Jan 4, 2017 at 22:35
  • I believe angular only supports jquery 2.1 and above Commented Jan 4, 2017 at 22:35
  • 2
    I think you need to load jq first Commented Jan 4, 2017 at 22:35
  • Are you using $routeProvider in your code? It's a provider in ngRoute. I don't see any reference to angular-route.js in your example. Commented Jan 6, 2017 at 10:58

0

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.