在我的项目中,路由器设置如下:
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。
但是那个东西已经存在了,并且路径都是独一无二的。
那我错过了什么?