Build Windows 8 Apps with JavaScriptの冒頭にあるチュートリアルに従っています。私の ListView は単にデータを表示していないので、どこを向くべきかわかりません。シンプルで簡単に見えますが、何かが欠けているに違いありません。アプリを実行 (または Blend で表示) すると、ListView データ以外のすべてが表示されます。私が見逃しているものはありますか?
結果は次のとおりです。
これはHTMLです:
<body>
<div class="fragment homepage">
<header aria-label="Header content" role="banner">
<button class="win-backbutton" aria-label="Back" disabled type="button"></button>
<h1 class="titlearea win-type-ellipsis">
<span class="pagetitle">Bob's RSS Reader</span>
</h1>
</header>
<section aria-label="Main content" role="main">
<div>List of feeds:</div>
<div data-win-control="WinJS.UI.ListView" data-win-options="{itemDataSource:feeds.dataSource}"></div>
</section>
</div>
</body>
これが home.js ファイルです。
(function () {
"use strict";
window.feeds = [
{ title: "Brandon Satrom",
url: "http://feeds.feedburner.com/userinexperience/tYGT" },
{ title: "Chris Sells",
url: "http://sellsbrothers.com/posts/?format=rss" },
{ title: "Channel 9",
url: "http://channel9.msdn.com/Feeds/RSS" },
];
WinJS.UI.Pages.define("/pages/home/home.html", {
// This function is called whenever a user navigates to this page. It
// populates the page elements with the app's data.
ready: function (element, options) {
}
});
})();