Support `<script>` tag inside `<script type="text/ng-template">`
I haven't seen an issue for this. Either 1) there's is support for this, but not documented or 2) there's currently no support for this.
The issue:
<script type="text/ng-template" id="/tpl.html">
<script>
...some other script...
</script>
</script>
cannot be written because the first </script> closes the first <script ...>. This leads to the fact that http://docs.angularjs.org/partials/api/ng.directive:script.html gets generated incorrectly and is thus not presented correctly in http://docs.angularjs.org/api/ng.directive:script (see this comment).
The question is, would simply escaping the opening braket solve the documentation issue? That is:
<script type="text/ng-template" id="/tpl.html">
<script>
...some other script...
/script>
</script>
Include jquery and script tags will work in templates
Include jquery and script tags will work in templates
But isn't that simply the result of the webbrowser automatically closing the opened tag because it doesn't have a close tag itself?
A StackOverflow with a similar issue: http://stackoverflow.com/questions/14261232/including-script-tag-in-script-type-text-template-tag
OK, so we've got this in the build-generated docs (build/docs/partials/api/ng.directive:script.html):
<script type="text/ng-template" id="index.html-193">
<script type="text/ng-template" id="/tpl.html">
Content of the template.
</script>
<a ng-click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a>
<div id="tpl-content" ng-include src="currentTpl"></div>
</script>
Should probably escape <script> while generating docs.
I don't believe that we can support script elements within script elements without resorting to some special angular-specific escaping/unescaping (something I'm not interested in).
in scenarios where script elements are needed in templates (not that common), the templateCache should be populated directly via imperative code. that's what we should do for our docs app as well.
@petebacondarwin is rewriting the docs generator, so there is actually a good chance of this happening reasonably soon.
in the long term, we'll move over to using template elements which don't suffer from this limitation.
I'm going to close this issue, because as I said, we can't fix this without angular-specific hacks.
Aight. Thanks for having a look at this issue!