私は次の設定をしています:
var userSystemApp = angular.module("userSystem",['userServices','groupServices']).
config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
$routeProvider.
when('/user', {templateUrl: 'user/partials/userlist.html', controller: 'userListController'}).
when('/user/:userName', {templateUrl: 'user/partials/userdetail.html', controller: 'userDetailController'}).
when('/group',{templateUrl: 'group/partials/grouplist.html', controller: 'groupListController'}).
when('/group/:groupName', {templateUrl: 'group/partials/groupDetail.html', controller: 'groupDetailController'}).
otherwise({redirectTo: '/user'});
}]);
localhost/#/user に移動すると、groupListController がアクティブになります。localhost/#/group に移動すると、groupListController がアクティブになりますが、userlist.html 部分テンプレートが使用されます。
適切なコントローラーを使用していないのはなぜですか? ルーティングとテンプレートを根本的に不適切に使用していますか?
(ちなみに、私は mod_rewrite で index.html への空のパスを書き換えています)