テンプレート

improve this page | report issue

テンプレートの使用

テンプレートを使用して、アプリケーションを迅速にビルドできます。 これは、アプリケーションを迅速に変更および開発するのに役立つ、特定の機能が有効になったアプリケーション・テンプレートです。

デフォルトで、Digital App Builder には Mod Resorts と Tabs という 2 つのテンプレートが付属しています。

  • Mod Resorts: このテンプレートは、リゾート・アプリケーションのユース・ケース付きのサンプル・アプリケーションを提供します。 はじめは、ログイン・モジュール、チャット・モジュール、アプリケーション内フィードバック・モジュールが含まれています。 その後、ログイン・アダプターをデプロイし、独自のチャットボット資格情報を構成する必要があります。
  • Tabs: このテンプレートは、最下部にタブを提供するタブ付きモバイル・アプリケーション・インターフェースを提供します。 このテンプレートは、ログイン・モジュールも含んでいます。

カスタム・テンプレートの作成

デフォルトのテンプレートは以下の場所に保管されます。

  • MacOS: Users/<systemname>/Library/Application Support/IBM Digital App Builder/ionic_templates/
  • Windows: Users\<systemname>\AppData\Roaming\IBM Digital App Builder\ionic_templates\

Mod Resorts などのデフォルト・テンプレートの 1 つを複製してから編集することによって、カスタム・テンプレートを作成します。 コピーしたテンプレートで必要な変更をカスタマイズし、フォルダーを zip します。 作成したカスタム・テンプレート用のフォルダーを \ionic_templates\ の下に作成し、この新規フォルダーに .zip ファイルをコピーします。 \ionic_templates\ フォルダー内の templates.json ファイルを編集して、テンプレートを追加するための新規項目を追加します。 例えば、以下に示すように新規カスタム・テンプレートを追加できます。

{
    "version": 12,
    "templates": [
        {
            "name": "Mod Resorts",
            "icon": "modresorts/modresortslogo.png",
            "templateFile": "modresorts/modresorts.zip"
        },
        {
            "name": "Tabs",
            "icon": "tabs/tabs.png",
            "templateFile": "tabs/tabs.zip"
        }
       {
            "name": "MyCustomTemplate",
            "icon": "mytemplate/customtemplate.png",
            "templateFile": "mytemplate/customtemplate.zip"
        }
     ]
}

注記

  • version 番号を増やしてください。
  • リリース・チームからのテンプレート追加がある場合、更新によって \ionic_templates\ フォルダーが置き換えられます。 したがって、カスタム・テンプレート・フォルダーのバックアップを作成し、更新後に再適用するように注意してください。
Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.
Last modified on May 13, 2020