0

Why we call the Jquery script before call the angular script?

<script src="Scripts/jquery-2.1.3.js"></script>
<script src="Scripts/angular.js"></script>

If i call the jquery script, then why i go to angularjs? Any possible way there implement angularjs without using jquery?

Shaunak D
  • 20,588
  • 10
  • 46
  • 79
Ramesh Rajendran
  • 37,412
  • 45
  • 153
  • 234

2 Answers2

3

First of all, Angular does not depend on jQuery - you can use Angular perfectly fine without using jQuery. See this answer on the conceptual shift and this question on whether or not it's needed.

Second of all - you refer to jQuery before Angular because if jQuery is included then Angular will use it internally over its more limited implementation jqLite. This means you can use the entire jQuery API and not just the limited jqLite API everywhere in Angular (typically, in directives).

Technically, you can include jQuery later as well as long as you do it before the DOMContentLoaded event (that's $(document).ready in jQuery speak).

Community
  • 1
  • 1
Benjamin Gruenbaum
  • 270,886
  • 87
  • 504
  • 504
-1

You can go fine with angular.js alone without using jQuery if you need it's core features.

Here you can read more :

Does AngularJS really need jQuery?

Working Plnker with only Angular

Community
  • 1
  • 1
Sajeetharan
  • 216,225
  • 63
  • 350
  • 396