【发布时间】:2018-11-07 17:19:17
【问题描述】:
我正在尝试使用 locationProvider 从我的 Angularjs 应用程序的 URL 中删除主题标签,并且在我手动刷新页面之前它运行良好。当我刷新页面时,我的 angularjs js 和 css 文件现在正在加载。 请帮助我。
在 index.jsp 中
App.js
myapp.config(function($routeProvider, USER_ROLES, IdleProvider, KeepaliveProvider, $locationProvider) { $locationProvider.html5Mode(true); }
urlrewrite.xml
/login 资源/partials/login.html /login/brandname 资源/partials/login.html /home 资源/partials/home.html
web.xml:
http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> 原型创建的 Web 应用程序 UrlRewriteFilter org.tukey.web.filters.urlrewrite.UrlRewriteFilter confPath /WEB-INF/ urlrewrite.xml UrlRewriteFilter /* 请求转发
【问题讨论】:
-
大家好,请帮我解决上述问题。
-
您必须在 index.html 中添加带有基本 url 的基本标签
-
嗨,卡迪尔,感谢您的回复。我在下面添加了
但遇到了同样的问题 -
@Protozoid ,我正在关注同样提到的 url,但是当我刷新页面时,它没有加载我的 angular js 文件和 css。