-1
ルーティングを角度で設定してください。角度を設定する
$ location.path()がない場合は、index.htmlとMainControllerが読み込まれている必要があります。 $ location.path()= @ *の場合、*オブジェクトの名前はすべて、index2.htmlとmyControllerをロードする必要があります。
今では動作しません。
app.config(function ($routeProvider) {
$routeProvider
.when("/", {
templateUrl: "index.html",
controller: "MainController"
})
.when("/@*", {
templateUrl: "index2.html",
controller: "myController"
});
});
私が直接開くしようとしているとき 'url.com/@ object' ...私が間違っているの何を、「/ @オブジェクトを取得することはできません」がありますか? – Daryushka
私は、文字列をエンコードするURLではないということが問題です。 URLに '@'は使用できません。必要な場合は、[here](http://www.w3schools.com/tags/ref_urlencode.asp)で説明されているように、 '%40'にエンコードする必要があります。 –