Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 3d8246d

Browse files
Michel Boudreaumboudreau
Michel Boudreau
authored andcommitted
Adding better description of ng-jq, fixing tabs/spaces
1 parent ab90bef commit 3d8246d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/Angular.js

+2
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,8 @@ var csp = function() {
915915
*
916916
* Since this directive is global for the angular library, it is recommended
917917
* that it's added to the same element as ng-app or the HTML element, but it is not mandatory.
918+
* It needs to be noted that only the first instance of `ng-jq` will be used and all others
919+
* ignored.
918920
*
919921
* @example
920922
* This example shows how to force jqLite using the `ngJq` directive to the `html` tag.

test/AngularSpec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ describe('angular', function() {
626626
delete jq.name_;
627627
});
628628

629-
it('should return undefined when jq is not set, no jquery found (the default)', function() {
629+
it('should return undefined when jq is not set, no jQuery found (the default)', function() {
630630
expect(jq()).toBe(undefined);
631631
});
632632

@@ -665,7 +665,7 @@ describe('angular', function() {
665665
expect(document.querySelector).toHaveBeenCalledWith('[ng\\:jq]');
666666
});
667667

668-
it('should return "jquery" when jq is enabled manually via [ng-jq] with value "jQuery"', function() {
668+
it('should return "jQuery" when jq is enabled manually via [ng-jq] with value "jQuery"', function() {
669669
element.setAttribute('ng-jq', 'jQuery');
670670
spyOn(document, 'querySelector').andCallFake(function(selector) {
671671
if (selector === '[ng-jq]') return element;
@@ -674,7 +674,7 @@ describe('angular', function() {
674674
expect(document.querySelector).toHaveBeenCalledWith('[ng-jq]');
675675
});
676676

677-
it('should return "jquery" when jq is enabled manually via [data-ng-jq] with value "jQuery"', function() {
677+
it('should return "jQuery" when jq is enabled manually via [data-ng-jq] with value "jQuery"', function() {
678678
element.setAttribute('data-ng-jq', 'jQuery');
679679
spyOn(document, 'querySelector').andCallFake(function(selector) {
680680
if (selector === '[data-ng-jq]') return element;
@@ -683,7 +683,7 @@ describe('angular', function() {
683683
expect(document.querySelector).toHaveBeenCalledWith('[data-ng-jq]');
684684
});
685685

686-
it('should return "jquery" when jq is enabled manually via [x-ng-jq] with value "jQuery"', function() {
686+
it('should return "jQuery" when jq is enabled manually via [x-ng-jq] with value "jQuery"', function() {
687687
element.setAttribute('x-ng-jq', 'jQuery');
688688
spyOn(document, 'querySelector').andCallFake(function(selector) {
689689
if (selector === '[x-ng-jq]') return element;
@@ -692,7 +692,7 @@ describe('angular', function() {
692692
expect(document.querySelector).toHaveBeenCalledWith('[x-ng-jq]');
693693
});
694694

695-
it('should return "jquery" when jq is enabled manually via [ng:jq] with value "jQuery"', function() {
695+
it('should return "jQuery" when jq is enabled manually via [ng:jq] with value "jQuery"', function() {
696696
element.setAttribute('ng:jq', 'jQuery');
697697
spyOn(document, 'querySelector').andCallFake(function(selector) {
698698
if (selector === '[ng\\:jq]') return element;

0 commit comments

Comments
 (0)