This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 5 files changed +44
-0
lines changed
5 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html ng-app ="test " ng-jq >
3
+ < body >
4
+ {{jqueryVersion}}
5
+
6
+ < script src ="../../../../bower_components/jquery/dist/jquery.js "> </ script >
7
+ < script src ="angular.js "> </ script >
8
+ < script type ="text/javascript " src ="script.js "> </ script >
9
+ </ body >
10
+ </ html >
Original file line number Diff line number Diff line change
1
+ angular . module ( 'test' , [ ] )
2
+ . run ( function ( $rootScope ) {
3
+ $rootScope . jqueryVersion = window . angular . element ( ) . jquery || 'jqLite' ;
4
+ } ) ;
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html ng-app ="test " ng-jq ="jQuery_2_1_0 ">
3
+ < body >
4
+ {{jqueryVersion}}
5
+
6
+ < script src ="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js "> </ script >
7
+ < script >
8
+ var jQuery_2_1_0 = jQuery . noConflict ( ) ;
9
+ </ script >
10
+ < script src ="../../../../bower_components/jquery/dist/jquery.js "> </ script >
11
+ < script src ="angular.js "> </ script >
12
+ < script type ="text/javascript " src ="script.js "> </ script >
13
+ </ body >
14
+ </ html >
Original file line number Diff line number Diff line change
1
+ angular . module ( 'test' , [ ] )
2
+ . run ( function ( $rootScope ) {
3
+ $rootScope . jqueryVersion = window . angular . element ( ) . jquery || 'jqLite' ;
4
+ } ) ;
Original file line number Diff line number Diff line change
1
+ describe ( 'Customizing the jqlite / jquery version' , function ( ) {
2
+
3
+ it ( 'should be able to force jqlite' , function ( ) {
4
+ loadFixture ( "ngJq" ) . andWaitForAngular ( ) ;
5
+ expect ( element ( by . binding ( 'jqueryVersion' ) ) . getText ( ) ) . toBe ( 'jqLite' ) ;
6
+ } ) ;
7
+
8
+ it ( 'should be able to use a specific version jQuery' , function ( ) {
9
+ loadFixture ( "ngJqJquery" ) . andWaitForAngular ( ) ;
10
+ expect ( element ( by . binding ( 'jqueryVersion' ) ) . getText ( ) ) . toBe ( '2.1.0' ) ;
11
+ } ) ;
12
+ } ) ;
You can’t perform that action at this time.
0 commit comments