本文整理汇总了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', '');
});
示例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));
});
示例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();
*/
});
示例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));
});
示例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);
});
});
示例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();
*/
});
示例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();
*/
});
示例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);
});
});
示例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));
});
示例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();
*/
});