所以我有这些路线:
state('app.editProject', {
url: '/projects/:projectId/edit',
templateUrl: 'app/modules/projects/views/edit-project.client.view.html'
}).
state('app.viewExpense', {
url: '/expenses/:expenseId',
templateUrl: 'app/modules/projects/views/view-expense.client.view.html'
}).
state('app.viewIncome', {
url: '/incomes/:incomeId',
templateUrl: 'app/modules/projects/views/view-income.client.view.html'
}).
state('app.editProjectTab', {
url: '/projects/:projectId/edit/:currentTab',
templateUrl: 'app/modules/projects/views/edit-project.client.view.html',
reloadOnSearch: false
}).
我
/app/projects/22/edit/expenses
我有这样的链接
<a data-ng-href="#!/app/expenses/{{ expense.id }}">{{ expense.description }}</a>
当我点击此链接时,这会将我发送到正确的链接,但在此之后立即将我发送到/ app / projects / undefined / edit / documents(文档是最后一个选项卡)
我找到了一个&#34;解决方法&#34;当我看到:projectId未定义时我回到了历史。
有谁知道为什么会这样?
提前致谢!