本文整理汇总了TypeScript中aurelia-pal.PLATFORM.moduleName方法的典型用法代码示例。如果您正苦于以下问题:TypeScript PLATFORM.moduleName方法的具体用法?TypeScript PLATFORM.moduleName怎么用?TypeScript PLATFORM.moduleName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aurelia-pal.PLATFORM
的用法示例。
在下文中一共展示了PLATFORM.moduleName方法的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, router: Router) {
config.title = 'Aurelia';
config.options.pushState = true;
config.map([
{ route: ['', 'home'], name: 'home', moduleId: PLATFORM.moduleName('views/home'), nav: true, title: 'Home', settings: { name: "Aurelia" } },
{ route: ['/view1', 'view1'], name: 'view1', moduleId: PLATFORM.moduleName('views/view1'), nav: true, title: 'View 1' },
{ route: ['/view2', 'view2'], name: 'view2', moduleId: PLATFORM.moduleName('views/view2'), nav: true, title: 'View 2' }
]);
config.mapUnknownRoutes({ redirect: '' });
this.router = router;
}