如何转到位于文件夹内的angulaJS应用程序

时间:2017-09-29 18:50:43

标签: html angularjs anchor

这是我在服务器上的文件夹结构:

enter image description here

如何从当前文件夹中的索引启动AngularJSAPP文件夹中的角度JS应用程序?

<a href="./AngularJSApp/" target="_blank">Angular JS app</a>

链接应该如何? 当我尝试类似的东西时:

    <a href="./AngularJSApp/index.html" target="_blank">Angular JS app</a>

服务器返回代码404.它无法找到文件。

enter image description here

    <script src="node_modules/angular/angular.js"></script>
<script src="node_modules/angular-route/angular-route.js"></script>
<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.js"></script>
<script src="app.module.js"></script>
<script src="app.routes.js"></script>
<script src="services/data.service.js"></script>
<script src="services/user.service.js"></script>
<script src="services/localstorage.service.js"></script>
<script src="services/data.salescharts.service.js"></script>
<script src="directives/directives.js"></script>
<script src="js/admincontroller.js"></script>
<script src="js/carcontroller.js"></script>
<script src="js/logincontroller.js"></script>
<script src="js/saleschartcontroller.js"></script>
<script src="js/registercontoller.js"></script>

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

enter image description here

1 个答案:

答案 0 :(得分:1)

根据评论的信息。

您需要在每条路径前添加../。 没有它,浏览器会尝试使用index.html在同一目录中查找文件。

<script src="../node_modules/angular/angular.js"></script>
<script src="../node_modules/angular-route/angular-route.js"></script>
<script src="../node_modules/jquery/dist/jquery.js"></script>
......