リソースビューアアプリを作っているのですが、マッチングを試みたことが問題です when("/!/:resourceUrl")。
リソースの URL が のようなものであれば問題なく動作/pathしますが、/path/to/the/resource.
どのくらいのパスが必要なのかわからないので、できません.when("/!/:path1/:path2/:path3")。
何か案は?
リソースビューアアプリを作っているのですが、マッチングを試みたことが問題です when("/!/:resourceUrl")。
リソースの URL が のようなものであれば問題なく動作/pathしますが、/path/to/the/resource.
どのくらいのパスが必要なのかわからないので、できません.when("/!/:path1/:path2/:path3")。
何か案は?
angular-1.2以降、これを行うことができます:
when("/!/:resourceUrl*")
http://code.angularjs.org/1.2.0/docs/api/ngRoute.$routeProvider
特に、ドキュメントには次の例が示されています。
たとえば、次のようなルート/color/:color/largecode/:largecode*\/editが一致/color/brown/largecode
/code/with/slashs/editして抽出されます。
color: brownlargecode: code/with/slashs現在、AngularJS はルートでの正規表現をサポートしていません。
次のリンクを確認してください: https://github.com/angular/angular.js/issues/918、https://github.com/angular/angular.js/pull/972