使用 angularjs 时,#
需要删除 。为此,您需要设置以下内容:
$locationProvider.html5Mode(true);
并添加基本标签,以便在页面刷新时正常工作。关键是如果它被定义为<base href="http://example.com/">
then 它只能从这个 url 工作。即我无法访问该网站www.example.com
。
那么有没有办法配置某种多基,以便当一个失败时,它会被另一个替换?
使用 angularjs 时,#
需要删除 。为此,您需要设置以下内容:
$locationProvider.html5Mode(true);
并添加基本标签,以便在页面刷新时正常工作。关键是如果它被定义为<base href="http://example.com/">
then 它只能从这个 url 工作。即我无法访问该网站www.example.com
。
那么有没有办法配置某种多基,以便当一个失败时,它会被另一个替换?