我正在使用angular 1.x并且我的webapp的索引页附加了/#!/请建议可能的outlook错误。
这不是一个错误,正是预期的结果。基本上将html5mode设置为true,并将基本链接添加到索引页的头部。
$locationProvider.html5Mode(true);
<head>
<base href="/">
</head>
本教程详细介绍:
https://scotch.io/tutorials/pretty-urls-in-angularjs-removing-the-hashtag
有关html5历史api的更多信息
$location
服务有两种配置模式,用于控制浏览器地址栏中URL的格式:Hashbang模式(默认和您在应用程序中设置)和HTML5模式,它基于使用HTML5 History API。
在official docs上,您可以阅读更多相关内容并了解其工作原理。
继续摇摆!