当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Aurelia.start方法代码示例

本文整理汇总了TypeScript中aurelia-framework.Aurelia.start方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Aurelia.start方法的具体用法?TypeScript Aurelia.start怎么用?TypeScript Aurelia.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在aurelia-framework.Aurelia的用法示例。


在下文中一共展示了Aurelia.start方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: bootstrap

bootstrap((aurelia: Aurelia): void => {
  aurelia.use
    .standardConfiguration()
    .developmentLogging()
    .plugin('aurelia-animator-css');
    
  aurelia.start().then(() => aurelia.setRoot('app', document.body))});
开发者ID:brandonseydel,项目名称:5IVE,代码行数:7,代码来源:main.ts

示例2: configure

export async function configure(aurelia: Aurelia) {
  aurelia.use
    .standardConfiguration()
    .developmentLogging()
    .plugin('aurelia-materialize-bridge', bridge => bridge.useAll())
    .plugin('aurelia-dialog', config => {
      config.useDefaults();
      config.settings.lock = true;
      config.settings.centerHorizontalOnly = false;
      config.settings.startingZIndex = 1005;
    });

  // Uncomment the line below to enable animation.
  // aurelia.use.plugin('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('aurelia-html-import-template-loader')

  await aurelia.start();
  aurelia.setRoot('app');

  // if you would like your website to work offline (Service Worker), 
  // install and enable the @easy-webpack/config-offline package in webpack.config.js and uncomment the following code:
  /*
  const offline = await System.import('offline-plugin/runtime');
  offline.install();
  */
}
开发者ID:glennpierce,项目名称:PartyZone,代码行数:29,代码来源:main.ts

示例3: configure

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

  aurelia.start().then(() => aurelia.setRoot('memo'))
}
开发者ID:kst83,项目名称:aurelia-flickr-ts-memo-game,代码行数:7,代码来源:main.ts

示例4: configure

export async function configure(aurelia: Aurelia) {
  var authConfig = configureAuth();

  aurelia.use
    .plugin('aurelia-auth', (baseConfig) => {
        baseConfig.configure(authConfig);
    })
    .plugin("aurelia-dialog", (config) => {
      config.useDefaults();
    })
    // .developmentLogging()
    .standardConfiguration();

  // Uncomment the line below to enable animation.
  // aurelia.use.plugin('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('aurelia-html-import-template-loader')

  await aurelia.start();
  aurelia.setRoot('app');

  // if you would like your website to work offline (Service Worker), 
  // install and enable the @easy-webpack/config-offline package in webpack.config.js and uncomment the following code:
  /*
  const offline = await System.import('offline-plugin/runtime');
  offline.install();
  */
}
开发者ID:xmichaelx,项目名称:skeleton-navigation,代码行数:30,代码来源:main.ts

示例5: configure

export function configure(aurelia: Aurelia) {
    aurelia.use
        .standardConfiguration()
        .developmentLogging()
        .plugin('aurelia-animator-velocity', instance => {
            instance.options.duration = 300;
            instance.options.easing = "linear";

            instance.enterAnimation = { properties: "fadeIn", options: { easing: "easeIn", duration: 400 } };
            instance.leaveAnimation = { properties: "fadeOut", options: { easing: "easeIn", duration: 400 } };
        });

    aurelia.start().then(() => {
        //Register the unhandled exception classes so that the specified dependencies can be injected
        aurelia.container.registerSingleton(UnhandledExceptionProvider, UnhandledExceptionProvider);
        aurelia.container.registerSingleton(UnhandledExceptionHandler, UnhandledExceptionHandler);

        //Create the exception provider and handler so that they can register for uncaught errors
        aurelia.container.get(UnhandledExceptionProvider);
        aurelia.container.get(UnhandledExceptionHandler);

        aurelia.container.registerSingleton(HttpClient, HttpClient);
        configureHttpClient(aurelia.container.get(HttpClient));

        aurelia.setRoot('app/layout/shell')
    });

    toastr.options.timeOut = 4000;
    toastr.options.positionClass = 'toast-bottom-right';
}
开发者ID:macinnir,项目名称:au-demos,代码行数:30,代码来源:main.ts

示例6: 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

示例7: configure

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

  aurelia.start().then(a => a.setRoot());
}
开发者ID:tibor19,项目名称:NotesApp,代码行数:7,代码来源:main.ts

示例8: configure

export function configure(aurelia: Aurelia) {

    aurelia.use.standardConfiguration()
        .plugin('aurelia-chart')
        .plugin('aurelia-i18n', (i18n) => {
            return i18n.setup({
                lng: 'en',
                fallbackLng: 'en'
            });
        })
        .plugin('aurelia-notification', config => {
            config.configure({
                translate: false,
                notifications: {
                    'success': 'humane-libnotify-success',
                    'error': 'humane-libnotify-error',
                    'info': 'humane-libnotify-info'
                }
            });
        })
        .plugin('aurelia-validation')
        .plugin('aurelia-bootstrap-datetimepicker', config => {
            config.options.showTodayButton = true;
        });

    if (IS_DEV_BUILD) {
        aurelia.use.developmentLogging();
    }

    aurelia.start().then(() => aurelia.setRoot('app/components/app/app'));
}
开发者ID:NickSchweitzer,项目名称:SumpPumpMonitor,代码行数:31,代码来源:boot.ts

示例9: configure

export function configure(aurelia:Aurelia) {
  aurelia.use
    .standardConfiguration()
    .developmentLogging()
    .plugin('./js/resources/index');
  aurelia.start().then(a => a.setRoot('./js/app'));
}
开发者ID:boubad,项目名称:vscinfoapp,代码行数:7,代码来源:main.ts

示例10: bootstrap

bootstrap(async (aurelia: Aurelia) => {
  aurelia.use
    .standardConfiguration()
    .developmentLogging()
    .plugin('aurelia-api', config => {
      config
        .registerEndpoint('github', 'https://api.github.com/')
        .registerEndpoint('api', 'http://localhost:3000/api/')
        .setDefaultEndpoint('github');
    })
    .plugin('aurelia-orm', config => {
      config.registerEntity(Customers)
      config.registerEntity(User);
    })
    /* @see https://github.com/spoonx/aurelia-datatable */
    .plugin('aurelia-datatable')

  const rootElement = document.body;
  rootElement.setAttribute('aurelia-app', '');

  await aurelia.start();
  aurelia.setRoot('app', rootElement);
  // if you would like your website to work offline (Service Worker),
  // install and enable the @easy-webpack/config-offline package in webpack.config.js and uncomment the following code:
  /*
  const offline = await System.import('offline-plugin/runtime');
  offline.install();
  */
});
开发者ID:doktordirk,项目名称:aurelia-orm-loopback-sample,代码行数:29,代码来源:main.ts


注:本文中的aurelia-framework.Aurelia.start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。