在我的项目中的路由器设置这样的:如何在浏览器在Angular 1.5中刷新时保留相同的页面?
myApp.component("rsapproot", {
transclude: true,
template: "<ng-transclude></ng-transclude>",
$routeConfig: [
{ path: "/login", component: "rsapplogin", name: "Login" },
{ path: "/tenant", component: "rsapptenantid", name: "Tenant" },
{ path: "/my-dashboard", component: "rsappmyrdash", name: "MyDash" },
{ path: "/my-reports", component: "rsappmyreports", name: "AppReports"},
{ path: "/equipment-details/:type/:id", component: "rsequipmentdetails", name: "EquipmentDetails" },
{ path: "/my/resources", component: "rsappresourceslist", name: "AppResourceList" },
F5后,现在预期的行为,或粘贴URL时,分别具有电流路径重新加载或导航到该路径,而不是最初的应用程序路径加载。
我知道为了在重新加载应用程序后保留页面,应该给出表示路径的url。
但那东西已经在那里,路径分别都是唯一的。
那么我错过了什么?
您是否在启用HTML5模式的情况下使用此功能? –
否也可以与组件路由器一起使用。能否请你帮忙 ? – StrugglingCoder