0
角度アプリでngRouteを使用していて、カスタムルーティング用に拡張できるかどうか不思議でした。クエリパラメータに基づいた角度ngRouteカスタムルーティング
たとえば、URL内の特定のクエリ文字列を読み込んでルーティングを行いたいとします。 URLが「index.html?Contacts」のようなもので終わる場合、これを連絡先テンプレートにルーティングしたいと思います。
$routeProvider
.when('index.html?Home', {
templateUrl: 'app/home/index.html',
controller: 'HomeController'
})
.when('index.html?Contacts', {
templateUrl: 'app/contacts/index.html',
controller: 'ContactsController'
})
.when('index.html?About', {
templateUrl: 'app/about/index.html',
controller: 'AboutController'
})
上記のとおり、「index.html」もURLに入れておきたいと思います。これは可能ですか?