I am using AngularJS includes. The code for my index.html is as follows:
<!DOCTYPE html>
<html ng-app="">
<head>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
    <script src="../js/application.js"></script>
</head>
<body>
    <div ng-include src="'../includes/footer.html'"></div>
</body>
</html>
application.js is in a folder called js and it reads as follows:
function setFooter() {
    var currentDate = new Date();
    currentYear = currentDate.getFullYear();
    document.write('© ' + currentYear + ' All rights reserved.');
}
footer.html is in a folder called includes and it reads as follows:
<div id="footer">
    <div class="container">
        <div class="footerContainer">
            <p class="text-white">
                <script type="text/javascript">
                    setFooter();
                </script>
            </p>
        </div>
    </div>
</div>
AngularJS includes are working since the footer is displayed in index.html but the JavaScript function setFooter in footer.html is never called.
Any help would be appreciated. Thanks.
 
     
    