當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。