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


TypeScript aurelia-bootstrapper-webpack.bootstrap函数代码示例

本文整理汇总了TypeScript中aurelia-bootstrapper-webpack.bootstrap函数的典型用法代码示例。如果您正苦于以下问题:TypeScript bootstrap函数的具体用法?TypeScript bootstrap怎么用?TypeScript bootstrap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: bootstrap

import {Aurelia} from 'aurelia-framework';
import {bootstrap} from 'aurelia-bootstrapper-webpack';

import 'bootstrap';

import '../node_modules/bootstrap/dist/css/bootstrap.css';
import '../node_modules/font-awesome/css/font-awesome.css';
import '../styles/styles.css';

bootstrap((aurelia: Aurelia): void => {
  aurelia.use
    .standardConfiguration()
    .developmentLogging();

  const rootElem = document.body;
  aurelia.start().then(() => aurelia.setRoot('app', rootElem));
  rootElem.setAttribute('aurelia-app', '');
});
开发者ID:AureliaFramework,项目名称:skeleton-navigation,代码行数:18,代码来源:main.ts

示例2: bootstrap

import {Aurelia} from "aurelia-framework";
import {bootstrap} from "aurelia-bootstrapper-webpack";

import "../node_modules/bootstrap/dist/css/bootstrap.css";
import "../node_modules/font-awesome/css/font-awesome.css";
import "../styles/styles.css";

bootstrap((aurelia: Aurelia): void => {
  aurelia.use
    .standardConfiguration()
    .developmentLogging()
    .plugin("aurelia-animator-css");

  aurelia.start().then(() => aurelia.setRoot("app", document.body));
});
开发者ID:daramire,项目名称:skeleton-navigation-typescript,代码行数:15,代码来源:main.ts

示例3: bootstrap

import {Aurelia} from 'aurelia-framework';
import {bootstrap} from 'aurelia-bootstrapper-webpack';

import './dom-ready';

bootstrap(async (aurelia: Aurelia) => {
  aurelia.use
    .standardConfiguration()
    .developmentLogging();

  //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')

  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:Thanood,项目名称:webpack-domready-issue,代码行数:29,代码来源:main.ts

示例4: bootstrap

import {Aurelia} from 'aurelia-framework';
import {bootstrap} from 'aurelia-bootstrapper-webpack';

import 'primeui/themes/delta/theme.css';
import 'font-awesome/css/font-awesome.css';

import '../resources/css/jquery-ui.css';
import '../resources/css/quill.snow.css';
import 'primeui/primeui-ng-all.css';

import '../resources/css/site.css';

//import '../resources/js/quill.min.js';

import 'jqueryui'
import 'jquery';

bootstrap((aurelia: Aurelia): void => {
  aurelia.use
  .standardConfiguration()
  .developmentLogging()
  .feature('feature')
  aurelia.start().then(() => aurelia.setRoot('app', document.body));
});
开发者ID:hwaastad,项目名称:aurelia-primeui-webpack,代码行数:24,代码来源:main.ts

示例5: bootstrap

import '../node_modules/bootstrap/dist/css/bootstrap.css';
import 'font-awesome/css/font-awesome.css';
import '../styles/styles.css';
import'../sass/styles.scss'
import $ from 'jquery'

import {Aurelia} from 'aurelia-framework';
import {bootstrap} from 'aurelia-bootstrapper-webpack';

bootstrap((aurelia: Aurelia) => {
  aurelia.use
    .standardConfiguration()
    .developmentLogging();

  //Uncomment the line below to enable animation.
  //aurelia.use.plugin('aurelia-animator-css');

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


  // aurelia.start().then(() => aurelia.setRoot('app', document.body));
  aurelia.start().then(a => a.setRoot('app', document.body))
    .then(a => {
      // Initialize any frameworks you want to use
     // var name = 'dan';
      //$(document.body).html(name);
    });
});
开发者ID:delebash,项目名称:TemplateAureliaBootstrapTSWebPack,代码行数:29,代码来源:main.ts

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

示例7: bootstrap

bootstrap(async (aurelia: Aurelia) => {
  let cache = new DataCache();
  cache.data.push("1");
  cache.data.push("2");
  cache.data.push("3");

  aurelia.use
    .instance("apiRoot", "http://localhost:9010/")
    .globalResources("common/dateFormat")
    .transient("SuperPlugIn", PlugIn1)
    .transient("SuperPlugIn", PlugIn2)
    .instance("Cache", cache)
    .standardConfiguration()
    .developmentLogging();

  // ViewLocator.prototype.convertOriginToViewUrl = (origin) => {
  //   let moduleId = origin.moduleId;
  //   var id = (moduleId.endsWith(".js") || (moduleId.endsWith(".ts")) ?
  //     moduleId.substring(0, moduleId.length - 3) : moduleId);
  //   return id.replace("viewmodels", "views") + ".html";
  // }
  //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")

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

  await aurelia.start();
  //aurelia.setRoot("app", rootElement);
  aurelia.setRoot("shell", 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:rajajhansi,项目名称:communityapp-aurelia-tswebpack,代码行数:41,代码来源:main.ts

示例8: bootstrap

import {bootstrap} from "aurelia-bootstrapper-webpack";
import {Aurelia} from "aurelia-framework";

bootstrap((aurelia: Aurelia) => {
    aurelia.use.standardConfiguration().developmentLogging();
    aurelia.start().then(() => {
        aurelia.setRoot("main-app/app", document.body);
    });
});
开发者ID:heruan,项目名称:aurelia-route-mapper-example,代码行数:9,代码来源:index.ts

示例9: bootstrap

import {Aurelia} from "aurelia-framework"
import {bootstrap} from 'aurelia-bootstrapper-webpack';

import '../node_modules/font-awesome/css/font-awesome.css';
import '../node_modules/bootstrap/dist/css/bootstrap.css';
import './pages/app.css';

bootstrap((aurelia: Aurelia): void => {
    aurelia.use
        .standardConfiguration()
        //.feature("resources")
        .developmentLogging();

    //Uncomment the line below to enable animation.
    //aurelia.use.plugin('aurelia-animator-css');

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

    aurelia.start().then(() => aurelia.setRoot('pages/app', document.body));
});
开发者ID:teves-castro,项目名称:node-aurelia-template,代码行数:21,代码来源:main.ts

示例10: bootstrap

import {Aurelia} from 'aurelia-framework';
import {bootstrap} from 'aurelia-bootstrapper-webpack';

bootstrap(async (aurelia: Aurelia) => {
  aurelia.use
    .standardConfiguration()
    .developmentLogging();

  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), 
  // enable the OfflinePlugin in config/webpack.common.js and uncomment the following code:
  /*
  const offline = await System.import('offline-plugin/runtime');
  offline.install();
  */
});
开发者ID:Felzura,项目名称:skeleton-navigation,代码行数:21,代码来源:main.ts


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