見ていただきありがとうございます! ここに私の質問です。angle-route1.6.1が正しく動作しません
[app.html]
...
<custom />
...
<script>
...
app.config(["$routeProvider", function ($routeProvider) {
$routeProvider.when("/checkout", {
templateUrl: "views/checkoutSummary.html",
});
$routeProvider.when("/products", {
templateUrl: "views/productList.html"
});
$routeProvider.otherwise({
templateUrl: "/views/productList.html",
})
}])
...
</script>
"カスタム" のためのディレクティブはここにある:私は要素 "A" をクリックすると
<div class="navbar-right">
<div class="navbar-text">
<b>购物车:</b>
{{itemCount()}} 个商品,
{{total() | currency}}
</div>
<a href="#/checkout" class="btn btn-default navbar-btn">结算</a>
</div>
、私のブラウザのhrefは次のとおりです。
http://localhost:3000/app.html#!#%2Fcheckout
と$location.hash()
is /checkout
実際には、正しいhrefが次のようになります。
http://localhost:3000/app.html#!/checkout
または
http://localhost:3000/app.html#!%2Fcheckout
プログラムは後ろに "#" を追加することをなぜ "!"?
TxとHappy Chinese New Year!
試して、[の '结算' – Sravan
可能な重複Angular 1.6の単純ハッシュ(#/)の代わりにURLハッシュバング(#!/)プレフィックス(http://stackoverflow.com/questions/41226122/url-hash-bang-prefix-instead-of-simple-ハッシュインアングル1〜6) – Mistalis
[angularjs 1.6.0(最新のもの)ルートが動作しない可能性があります](http://stackoverflow.com/questions/41211875/angularjs-1-6-0-latest-現在のルートが機能していない) – georgeawg