在我的项目中,路由器设置如下:
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时的行为分别是重新加载或导航到所述路径,而是加载初始应用程序路径。
例如/ my / resources被重定向到/ my-dashboard。
我知道为了在重新加载应用后保留页面,应该提供代表路径的网址。
但是那个东西已经存在并且路径分别都是唯一的。
然后我错过了什么?