0
這是後我跑我的角度aaplication角js腳本加載
<!DOCTYPE html>
<html class="no-js" ng-app="BasicHttpAuthExample"> <!--<![endif]-->
<head>
<script src="<?= ASSETS_PATH ?>/js/app2.js"></script>
<script src="<?= ASSETS_PATH ?>/js/main.js"></script>
<script src="http://localhost/SPA_DEMO/assets/js/jquery.countTo.js"></script>
</head>
<body ng-app="BasicHttpAuthExample">
<nav id="fh5co-main-nav" role="navigation">
<a href="#" class="js-fh5co-nav-toggle fh5co-nav-toggle active" id="Close"><i></i></a>
<div class="js-fullheight fh5co-table">
<div class="fh5co-table-cell js-fullheight">
<ul>
<li></li>
<li class="active"><a href="index.html">Home</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
</div>
</nav>
<ng-view>
</ng-view>
</body>
</html>
在這個當我加載在這個文件中加載視圖腳本是不是在視圖中可用。如何在每次加載視圖時加載一些腳本或如何在視圖中加載可用的加載腳本。
從html標記中刪除屬性'ng-app =「BasicHttpAuthExample」''。 –
爲什麼你有兩個ng-app =「BasicHttpAuthExample」,你的ng-controller(s)指令在哪裏,你在「查看腳本」下的含義是什麼?也很高興看到你的js文件的內容。不要在這裏添加內容,更好的方法是創建一個重要鏈接並提供鏈接。祝你好運 – Antipod