MCh*_*han 4 angularjs angularjs-routing
我在我的app.js文件中有以下2条路线,由于某种原因我不知道何时尝试导航到/clients/new-invoice我看到/clients/:clientID路线和模板.我可以转到正确页面的唯一方法是删除/clients/:clientID路线.
我也注意到,只有在我添加:clientID到下面的路线后才开始发生这种情况.
有人可以通过告诉我我在这里做错了什么来帮助我吗?
$routeProvider.when('/clients/:clientID',
{ templateUrl: 'templates/client-profile-view.html',
controller: 'ClientsController',
title: 'Client Profile',
data: {
auth: true,
plevel: [5]
}
});
$routeProvider.when('/clients/new-invoice',
{ templateUrl: 'templates/new-invoice.html',
controller: 'InvoicesController',
title: 'New Invoice',
data: {
auth: true,
plevel: [5]
}
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1145 次 |
| 最近记录: |