當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript aurelia-pal.PLATFORM類代碼示例

本文整理匯總了TypeScript中aurelia-pal.PLATFORM的典型用法代碼示例。如果您正苦於以下問題:TypeScript PLATFORM類的具體用法?TypeScript PLATFORM怎麽用?TypeScript PLATFORM使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了PLATFORM類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: configure

export function configure(aurelia: FrameworkConfiguration) {
    aurelia.globalResources([
        PLATFORM.moduleName('./tree-view/tree-node'),
        PLATFORM.moduleName('./tree-view/tree-node-template'),
        PLATFORM.moduleName('./tree-view/tree-view')
    ]);
}
開發者ID:Thanood,項目名稱:aurelia-tree-view,代碼行數:7,代碼來源:index.ts

示例2: configure

export function configure(frameworkConfig: FrameworkConfiguration, callback?: (config: PluginOptions) => void) {
  const logger = getLogger('aurelia-json-schema-form');

  logger.info('initializing aurelia-json-schema-form');

  // create defaults/apply user defined configuration
  const options = new PluginOptions();
  if (callback instanceof Function) {
    callback(options);
  }

  registerLogger(logger, options, frameworkConfig);

  registerConfiguration(logger, options, frameworkConfig);

  (frameworkConfig.container.get(RulesFactory) as RulesFactory).register();

  frameworkConfig.globalResources([
    PLATFORM.moduleName('./form/au-json-schema-form'),
    PLATFORM.moduleName('./value-converters/sf-number-value-converter'),
    PLATFORM.moduleName('./value-converters/sf-array-can-remove-value-converter'),
    PLATFORM.moduleName('./value-converters/sf-boolean-is-read-only-value-converter'),
    PLATFORM.moduleName('./form/array/sf-array'),
    PLATFORM.moduleName('./form/object/sf-object'),
    PLATFORM.moduleName('./form/number/sf-number'),
    PLATFORM.moduleName('./form/text/sf-string'),
    PLATFORM.moduleName('./form/boolean/sf-boolean'),
    PLATFORM.moduleName('./templates/bootstrap4/bootstrap-tooltip')
  ]);
}
開發者ID:jbockle,項目名稱:aurelia-json-schema-form,代碼行數:30,代碼來源:index.ts

示例3: configure

export async function configure(aurelia: Aurelia) {
  aurelia.use
    .standardConfiguration()
    .feature(PLATFORM.moduleName('resources/index'))
    .developmentLogging();

    aurelia.use.plugin(PLATFORM.moduleName('aurelia-bootstrap-datetimepicker'), config => {
      config.extra.bootstrapVersion = 4;
      config.extra.iconBase = 'font-awesome';
      config.extra.withDateIcon = true;
    });
    aurelia.use.plugin(PLATFORM.moduleName('aurelia-auth/auth-filter'));
    aurelia.use.plugin(PLATFORM.moduleName('aurelia-auth'), baseConfig => {
    	baseConfig.configure(authConfig);
    });

  // Uncomment the line below to enable animation.
  // aurelia.use.plugin(PLATFORM.moduleName('aurelia-animator-css'));
  // if the css animator is enabled, add swap-order="after" to all router-view elements

  // Anyone wanting to use HTMLImports to load views, will need to install the following plugin.
  // aurelia.use.plugin(PLATFORM.moduleName('aurelia-html-import-template-loader'));

  await aurelia.start();
  await aurelia.setRoot(PLATFORM.moduleName('app'));
}
開發者ID:ghiscoding,項目名稱:Realtime-TODO-Aurelia-RethinkDB,代碼行數:26,代碼來源:main.ts

示例4: configure

export function configure(aurelia: Aurelia) {
  aurelia.use
    .standardConfiguration()
    .plugin(PLATFORM.moduleName('aurelia-validation'))
    .feature(PLATFORM.moduleName('aurelia-json-schema-form/index'), options => {
      options.logLevel = logLevel.debug;
    })
    .globalResources([PLATFORM.moduleName('random-number-generator')]);

  // Uncomment the line below to enable animation.
  // aurelia.use.plugin(PLATFORM.moduleName('aurelia-animator-css'));
  // if the css animator is enabled, add swap-order="after" to all router-view elements

  // Anyone wanting to use HTMLImports to load views, will need to install the following plugin.
  // aurelia.use.plugin(PLATFORM.moduleName("aurelia-html-import-template-loader"));

  if (environment.debug) {
    aurelia.use.developmentLogging();
  }

  // if (environment.testing) {
  //   aurelia.use.plugin(PLATFORM.moduleName('aurelia-testing'));
  // }

  aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app')));
}
開發者ID:jbockle,項目名稱:aurelia-json-schema-form,代碼行數:26,代碼來源:main.ts

示例5: configure

export async function configure(aurelia) {
  aurelia.use
    .standardConfiguration()
    //https://github.com/aurelia/pal/issues/22
    .feature(PLATFORM.moduleName('table/index'))
    .plugin(PLATFORM.moduleName('aurelia-notification'), config => {
      config.configure({
        translate: false,  // 'true' needs aurelia-i18n to be configured
        notifications: {
         'success': 'humane-libnotify-success',
         'error': 'humane-libnotify-error',
         'info': 'humane-libnotify-info'
          }
        });
    })
    .developmentLogging();

    // Uncomment the line below to enable animation.
    // aurelia.use.plugin(PLATFORM.moduleName('aurelia-animator-css'));
    // if the css animator is enabled, add swap-order="after" to all router-view elements

    // Anyone wanting to use HTMLImports to load views, will need to install the following plugin.
    // aurelia.use.plugin(PLATFORM.moduleName('aurelia-html-import-template-loader'));

  await aurelia.start();
  await aurelia.setRoot(PLATFORM.moduleName('app'));
}
開發者ID:crsnyders,項目名稱:ctwug-dash,代碼行數:27,代碼來源:main.ts

示例6: configure

export function configure(config: FrameworkConfiguration) {
  config.globalResources([
    PLATFORM.moduleName('./elements/bootstrap-tooltip'),
    PLATFORM.moduleName('./elements/loading-indicator'),
    PLATFORM.moduleName('./value-converters/date-format')
  ]);
}
開發者ID:ghiscoding,項目名稱:Realtime-TODO-Aurelia-RethinkDB,代碼行數:7,代碼來源:index.ts

示例7: configure

export async function configure(aurelia: Aurelia) {
    aurelia.use
        .standardConfiguration()
        .developmentLogging();

    aurelia.use.plugin(PLATFORM.moduleName('resources'));

    await aurelia.start();
    await aurelia.setRoot(PLATFORM.moduleName('app'));
}
開發者ID:ServiceStack,項目名稱:ServiceStackVS,代碼行數:10,代碼來源:main.ts

示例8: configureRouter

  configureRouter(config: RouterConfiguration, router: Router) {
    config.title = 'Aurelia';
    config.map([
      { route: 'bootstrap-plugins', name: 'bootstrap-plugins',  moduleId: PLATFORM.moduleName('./bootstrap-plugins'), nav: true, title: 'Bootstrap Plugins' },
      { route: 'validation-form',   name: 'validation-form',    moduleId: PLATFORM.moduleName('./validation-form'),   nav: true, title: 'Validation Form' },
      { route: '', redirect: 'validation-form' }
    ]);

    this.router = router;
  }
開發者ID:amayr666,項目名稱:Aurelia-Bootstrap-Plugins,代碼行數:10,代碼來源:app.ts

示例9: configureRouter

  configureRouter(config: RouterConfiguration, router: Router) {
    config.title = 'Aurelia';
    config.map([
      { route: ['', 'welcome'], name: 'welcome',      moduleId: PLATFORM.moduleName('./welcome'),      nav: true, title: 'Welcome' },
      { route: 'users',         name: 'users',        moduleId: PLATFORM.moduleName('./users'),        nav: true, title: 'Github Users' },
      { route: 'child-router',  name: 'child-router', moduleId: PLATFORM.moduleName('./child-router'), nav: true, title: 'Child Router' },
    ]);

    this.router = router;
  }
開發者ID:AshleyGrant,項目名稱:skeleton-navigation,代碼行數:10,代碼來源:app.ts

示例10: configureRouter

  configureRouter(config: RouterConfiguration, router: Router) {
    config.title = 'CTWUG-DASH';
    //config.options.pushState = false;
    config.options.root = '/dash';
    config.map([
      { route: ['', 'transmission'],  name: 'transmission-remote',      moduleId: PLATFORM.moduleName('./transmission-remote'),      nav: true, title: 'Transmission' },
      { route: 'dc',                  name: 'dc',                       moduleId: PLATFORM.moduleName('./eiskaltdcpp'),      nav: true, title: 'DC++' },
      { route: 'torrent',             name: 'torrent',                  moduleId: PLATFORM.moduleName('./torrent-page'),      nav: true, title: 'Torrents' }
    ]);

    this.router = router;
  }
開發者ID:crsnyders,項目名稱:ctwug-dash,代碼行數:12,代碼來源:app.ts


注:本文中的aurelia-pal.PLATFORM類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。