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