3

I'd like to include a template html with angularjs like:

<div ng-include src="'template/slider.html'"></div>

I will take the template from http://www.jssor.com, which requires also some <head><script>... tags in the template itself:

Question: is it the correct way to create a template with a schema as follows, or should I move the elements somewhere else?

slider.html:

<head>
    <script src="jssor.slider.min.js"></script>
    <script>
        jssor_slider1_starter = function (containerId) {
            ...
        };
    </script>
</head>

    <div id="slider1_container">
        <!-- Slides Container -->
        <div ... />
        <script>jssor_slider1_starter('slider1_container');</script>
    </div>
membersound
  • 81,582
  • 193
  • 585
  • 1,120

1 Answers1

1

Your angular templates do not need to have the <head> tag, there should only be one <head> tag in your html page, and it should not be enclosed between the <body> tags. Having multiple <head> tags breaks validation and will cause unpredictable behavior.

Maria Saavedra
  • 187
  • 1
  • 5