Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Angularjs 1.2.24中没有哈希“”的ui路由器_Html_Angularjs_Angular Ui Router - Fatal编程技术网

Html Angularjs 1.2.24中没有哈希“”的ui路由器

Html Angularjs 1.2.24中没有哈希“”的ui路由器,html,angularjs,angular-ui-router,Html,Angularjs,Angular Ui Router,问题- 当前我的URL显示为http://localhost/app/public/index.html/login. 但现在我正试图从中删除它,但它一直在中断,无法加载资源。我四处寻找解决办法,但没有任何效果 到目前为止,我所尝试的: <base href="/"> in my index.html $locationProvider.html5Mode(true); in my app.js $locationProvider.html5Mode(true).hashPrefi

问题-

当前我的URL显示为http://localhost/app/public/index.html/login. 但现在我正试图从中删除它,但它一直在中断,无法加载资源。我四处寻找解决办法,但没有任何效果

到目前为止,我所尝试的:

<base href="/"> in my index.html
$locationProvider.html5Mode(true); in my app.js 
$locationProvider.html5Mode(true).hashPrefix('!'); (This after above did not worked)
有人说它根本不起作用。有人知道发生了什么吗

更新1-目录结构

-ProjectName
 -public
  -src (Controllers and views)
  -styles (CSS)
  -vendors
   --scripts (Angualrjs and other vendors)
  -index.html (main index file where all files links are mentioned as <script src="vendor/scripts/angular.js"></script>)
  -app.js

它无法加载哪个资源?他们的URL是什么,它们位于哪里?请查看我的更新问题:它无法加载从CSS到Angularjs的所有内容,并且找不到404。您没有提供代码,但您的基础是/,您使用的URL是vendor/scripts/angular.js,因此它查找angular.js的URL是/vendor/scripts/angular.js。而且angular.js实际上似乎位于/app/public/vendors/scripts/angular.js,但不知怎么的,它的性能并不好。正如您现在建议的,我提供了完整的路径,例如我的基本href。这解决了资源的问题,但现在我遇到了另一个未捕获的TypeError问题:无法读取未定义的属性'indexOf'。在做了一些研究之后,它来自这行$locationProvider.html5Modetrue;。这是关于同一问题的另一篇文章。有什么想法吗?这是一份工作报告。如果服务器设置正确,您可以在那里检查如何。。。