Skip to content

Commit 0190d6c

Browse files
committed
docs(ngInclude): add warning to onload function cause breaks in IE11
Closes angular#12493
1 parent c8e1db2 commit 0190d6c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ng/directive/ngInclude.js

+6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
* make sure you wrap it in **single** quotes, e.g. `src="'myPartialTemplate.html'"`.
3636
* @param {string=} onload Expression to evaluate when a new partial is loaded.
3737
*
38+
* <div class="alert alert-warning">
39+
* **Note:** Seems like the onload attribute is being handled differently by different browsers,
40+
* like with SVG elements in IE11. To fix this, you can instead use `data-onload`
41+
* in ng-include and it will work, because directives normalize the attribute names.
42+
* </div>
43+
*
3844
* @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll
3945
* $anchorScroll} to scroll the viewport after the content is loaded.
4046
*

0 commit comments

Comments
 (0)