私は再度ルーティングに問題があります。テンプレートURLからhtmlファイルへの角度1のルーティング
「テンプレート」では角度ルーティングを使用しますが、ページ番号のコンテンツはhtmlファイルにリンクします。私が持っているもの
:
app.config(function ($routeProvider) {
$routeProvider
.when("/", {
template: "<h1>Index</h1>"
})
.when("/about", {
templateUrl: "abc.html"
})
.otherwise({
redirectTo: "/"
});
});
そして "templateUrl" は動作しません。 それはスロー:Error: [$compile:tpload] Failed to load template: abc.html (HTTP status: -1)
は私が<div data-ng-view></div>
パスを使用する "abc.htmlは"
root
index.html
scripts
app.js
config.js
abc.html
は、だから私はscripts/abc.html
と "abc.html
" を使用し、それが動作しないです。
私はそれがおかしいと思う... – Nerf
@Nerfあなたは 'scripts/abc.html'を使用する必要があります。 –
それは機能しません。 – Nerf