angular.module('Stations', ['ngRoute'])
.config(function ($routeProvider) {
$routeProvider
.when('/documents/:stationId', {
templateUrl: '/Scripts/Modules/checklist/views/index.html',
controller: 'checklistController'
})
.when('/documents/details', {
templateUrl: '/Scripts/Modules/checklist/views/details.html',
controller: 'checklistDetailsController'
})
});
現在。但是,如果我轉到網址stations#/documents/details?Id=3&type=note
,它仍然會轉到文檔主視圖,而不是詳細視圖。Angularjs了路由無法正常工作
你能給我一個暗示我做錯了什麼嗎?
它不知道你要求什麼,所以它只顯示細節視圖。你從來沒有配置它來處理這樣的URL。 – Jhecht 2014-10-10 08:55:27