Library: Document that, when using requirejs, a page should only be instantiated after the whole library is loaded, otherwise it may fail to instantiate some widgets

オープン
#339 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@gabrielschulhof がすでに取り組んでいます。

2014年10月14日 から。

評価

この issue はまだ評価されていません。

説明

We need to provide an example of a scenario where somebody uses the library using requirejs, and maybe skips init altogether. For example,

require([
    "jqm/widgets/popup",
    "jqm/widgets/listview",
    "jqm/widgets/page" ], function() {

    $( function() {
        $( "#start-page" ).page();
    });
};

Will not work if requirejs loads page after it has loaded popup and listview. We need to document that, in 1.4.x, one needs to require page before requiring any of the widgets:

require([
    "jqm/widgets/page" ], function() {

    require([
        "jqm/widgets/popup",
        "jqm/widgets/listview" ] ,function() {

        $( function() {
            $( "#start-page" ).page();
        });
    });
});
主要言語
HTML
スター
55
フォーク
57
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jquery/api.jquerymobile.com のほかの issue

jquery/api.jquerymobile.com の issue をすべて見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。