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

Commit 40e00cd

Browse files
Kent C. Doddscaitp
Kent C. Dodds
authored andcommitted
docs(ngJq): update to indicate common pitfall
change docs for ngJq so it mentions that the placement of the directive is important with regards to the angular script. Closes #11779 Closes #11780
1 parent dfa722a commit 40e00cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Angular.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -964,10 +964,10 @@ var csp = function() {
964964
* used to force either jqLite by leaving ng-jq blank or setting the name of
965965
* the jquery variable under window (eg. jQuery).
966966
*
967-
* Since this directive is global for the angular library, it is recommended
968-
* that it's added to the same element as ng-app or the HTML element, but it is not mandatory.
969-
* It needs to be noted that only the first instance of `ng-jq` will be used and all others
970-
* ignored.
967+
* Since angular looks for this directive when it is loaded (doesn't wait for the
968+
* DOMContentLoaded event), it must be placed on an element that comes before the script
969+
* which loads angular. Also, only the first instance of `ng-jq` will be used and all
970+
* others ignored.
971971
*
972972
* @example
973973
* This example shows how to force jqLite using the `ngJq` directive to the `html` tag.

0 commit comments

Comments
 (0)