You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
In AngularJS 1.0.8 when one included jQuery on the page, Angular was using jQuery instead of jqLite to parse the DOM and was able to execute the inline <script> containing JavaScript code in template.
Now, in 1.2.0-rc.2 and 1.2.0-rc.3, javascript is not being executed, even after including jQuery.
According to #4555 this is because the animation library injects the script tag into DOM nodes that are not connected to the document and so jQuery doesn't run the script. It also notes that this can be worked around using a custom directive, which may be the idea solution in the long run.
In AngularJS 1.0.8 when one included jQuery on the page, Angular was using jQuery instead of jqLite to parse the DOM and was able to execute the inline
<script>
containing JavaScript code in template.Now, in 1.2.0-rc.2 and 1.2.0-rc.3, javascript is not being executed, even after including jQuery.
Simple examples illustrating the difference:
1.0.8 - http://plnkr.co/edit/ab2g4LLZxqXDAHl4Ia0x?p=preview
1.2.0-rc.3 - http://plnkr.co/edit/au2yBuxJXFJmSoZj7GII?p=preview
Inline scripts should output "Loaded!" and "Loaded2!" to the console. In rc.3 - it doesn't.
Btw, why not making Angular execute inline scripts on its own?
The text was updated successfully, but these errors were encountered: