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


TypeScript PLATFORM.moduleName方法代码示例

本文整理汇总了TypeScript中aurelia-framework.PLATFORM.moduleName方法的典型用法代码示例。如果您正苦于以下问题:TypeScript PLATFORM.moduleName方法的具体用法?TypeScript PLATFORM.moduleName怎么用?TypeScript PLATFORM.moduleName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在aurelia-framework.PLATFORM的用法示例。


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

示例1: configureRouter

    configureRouter(config: RouterConfiguration, router: Router) {
        config.title = 'PEW.Web.App';
        config.map([{
            route: [ '', 'home' ],
            name: 'home',
            settings: { icon: 'home' },
            moduleId: PLATFORM.moduleName('../home/home'),
            nav: true,
            title: 'Home'
        }, {
            route: 'counter',
            name: 'counter',
            settings: { icon: 'education' },
            moduleId: PLATFORM.moduleName('../counter/counter'),
            nav: true,
            title: 'Counter'
        }, {
            route: 'fetch-data',
            name: 'fetchdata',
            settings: { icon: 'th-list' },
            moduleId: PLATFORM.moduleName('../fetchdata/fetchdata'),
            nav: true,
            title: 'Fetch data'
        }]);

        this.router = router;
    }
开发者ID:mr-nuno,项目名称:pew.nu,代码行数:27,代码来源:app.ts

示例2: configureRouter

  configureRouter(config: RouterConfiguration, router: Router): void {
    config.map([
      {route: ['', 'list'], moduleId: PLATFORM.moduleName('./list'), name: 'list'},
      {route: 'edit/:id', moduleId: PLATFORM.moduleName('./edit'), name: 'edit'},
      {route: 'create', moduleId: PLATFORM.moduleName('./edit'), name: 'create'}
    ]);

    this.router = router;
  }
开发者ID:ghiscoding,项目名称:Realtime-TODO-Aurelia-RethinkDB,代码行数:9,代码来源:index.ts

示例3: configure

export function configure(frameworkConfig: FrameworkConfiguration, config: CoreConfig): Promise<void> {
	frameworkConfig.singleton(RouteMapper);
	frameworkConfig.globalResources([
		PLATFORM.moduleName("./routing/route-active/route-active.attribute"),
		PLATFORM.moduleName("./routing/route-href/route-href.attribute")
	]);

	Object.assign(routeActiveConfig, config.routeActive);
	return Promise.resolve();
}
开发者ID:sketch7,项目名称:ssv-au-core,代码行数:10,代码来源:config.ts

示例4: configure

export function configure(aurelia: Aurelia) {
    aurelia.use.standardConfiguration();

    aurelia.use
        .plugin(PLATFORM.moduleName('aurelia-google-maps'), (config: any) => {
            config.options({
                apiKey: 'AIzaSyCj-eGSewJFrmSuMg4WNU8FMhCDI4gP04Y', // use `false` to disable the key
                apiLibraries: 'drawing,geometry', //get optional libraries like drawing, geometry, ... - comma seperated list
                options: { panControl: true, panControlOptions: { position: 9 } }, //add google.maps.MapOptions on construct (https://developers.google.com/maps/documentation/javascript/3.exp/reference#MapOptions)
                language: 'en', // default: uses browser configuration (recommended). Set this parameter to set another language (https://developers.google.com/maps/documentation/javascript/localization)
                region: 'US', // default: it applies a default bias for application behavior towards the United States. (https://developers.google.com/maps/documentation/javascript/localization)
                markerCluster: {
                    enable: false,
                    src: 'https://cdn.rawgit.com/googlemaps/v3-utility-library/99a385c1/markerclusterer/src/markerclusterer.js', // self-hosting this file is highly recommended. (https://developers.google.com/maps/documentation/javascript/marker-clustering)
                    imagePath: 'https://cdn.rawgit.com/googlemaps/v3-utility-library/tree/master/markerclusterer/images/m', // the base URL where the images representing the clusters will be found. The full URL will be: `{imagePath}{[1-5]}`.`{imageExtension}` e.g. `foo/1.png`. Self-hosting these images is highly recommended. (https://developers.google.com/maps/documentation/javascript/marker-clustering)
                    imageExtension: 'png',
                }
            });
        });

    if (IS_DEV_BUILD) {
        aurelia.use.developmentLogging();
    }

    new HttpClient().configure(config => {
        const baseUrl = document.getElementsByTagName('base')[0].href;
        config.withBaseUrl(baseUrl);
    });

    aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app/components/app/app')));
}
开发者ID:couchbaselabs,项目名称:blog-source-code,代码行数:31,代码来源:boot.ts

示例5: configureRouter

    configureRouter(config: RouterConfiguration, router: Router): void {
        this.router = router;
        config.title = "Aurelia";
        config.map([
            { route: ["", "home"], name: "instagram", moduleId: PLATFORM.moduleName("instagram/index") },
        ]);

    }
开发者ID:grzegorzmanda,项目名称:au-webpack,代码行数:8,代码来源:app.ts

示例6: configure

export function configure(aurelia: Aurelia) {
  aurelia.use.standardConfiguration().developmentLogging();

  aurelia.use.feature(PLATFORM.moduleName("resources/index"));
  aurelia.use.plugin(PLATFORM.moduleName('aurelia-bootstrap-datetimepicker'), config => {
    // extra attributes, with config.extra
    config.extra.iconBase = 'font-awesome';
    config.extra.withDateIcon = true;

    // or even any picker options, with config.options
    config.options.format = 'YYYY-MM-DD';
    config.options.showTodayButton = true;
  });
  aurelia.use.plugin(PLATFORM.moduleName('aurelia-bootstrap-select'));
  aurelia.use.plugin(PLATFORM.moduleName('aurelia-bootstrap-tagsinput'));
  aurelia.use.plugin(PLATFORM.moduleName('aurelia-validation'));
  aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app')));
}
开发者ID:amayr666,项目名称:Aurelia-Bootstrap-Plugins,代码行数:18,代码来源:main.ts

示例7: configure

export async function configure(aurelia: Aurelia) {

    aurelia.use
        .standardConfiguration()
        .developmentLogging();

    await aurelia.start();
    await aurelia.setRoot(PLATFORM.moduleName("app"));
}
开发者ID:grzegorzmanda,项目名称:au-webpack,代码行数:9,代码来源:main.ts

示例8: function

	  let appRouterConfig: any = function(config: RouterConfiguration): void {
	    config.title = 'Aurelia';
			config.addPipelineStep('authorize', AuthorizeStep); // Add a route filter to the authorize extensibility point.

	    config.map([
        { route: ['', 'welcome'], name: 'welcome',      moduleId: PLATFORM.moduleName('./welcome'),                 nav: true,  title: 'Welcome' },
        { route: 'child-router',  name: 'child-router', moduleId: PLATFORM.moduleName('./child-router'),            nav: true,  title: 'Child Router' },
        { route: 'login',         name: 'login',        moduleId: PLATFORM.moduleName('./modules/auth/login'),      nav: false, title: 'Login' },
        { route: 'logout',        name: 'logout',       moduleId: PLATFORM.moduleName('./modules/auth/logout'),     nav: false, title: 'Logout' },
        { route: 'profile',       name: 'profile',      moduleId: PLATFORM.moduleName('./modules/auth/profile'),    nav: false, title: 'Profile' },
        { route: 'signup',        name: 'signup',       moduleId: PLATFORM.moduleName('./modules/auth/signup'),     nav: false, title: 'Signup' },
        { route: 'contacts',      name: 'contacts',     moduleId: PLATFORM.moduleName('./modules/contacts/index'),  nav: true,  title: 'Contacts',  auth: true },
        { route: 'customers',     name: 'customers',    moduleId: PLATFORM.moduleName('./modules/customers/index'), nav: true, 	title: 'CRM', 			auth: true },
        { route: 'todos',         name: 'todos',        moduleId: PLATFORM.moduleName('./modules/todos/index'),     nav: true,  title: 'TODOs',			auth: true }
      ]);
	  };
开发者ID:ghiscoding,项目名称:Realtime-TODO-Aurelia-RethinkDB,代码行数:16,代码来源:app-router-config.ts

示例9: configureRouter

    configureRouter(config: RouterConfiguration, router: Router) {
        config.title = 'GeospatialSearch';
        config.map([{
            route: [ '', 'home' ],
            name: 'home',
            settings: { icon: 'home' },
            moduleId: PLATFORM.moduleName('../home/home'),
            nav: true,
            title: 'Home'
        }, {
            route: 'counter',
            name: 'counter',
            settings: { icon: 'education' },
            moduleId: PLATFORM.moduleName('../counter/counter'),
            nav: true,
            title: 'Counter'
        }, {
            route: 'fetch-data',
            name: 'fetchdata',
            settings: { icon: 'th-list' },
            moduleId: PLATFORM.moduleName('../fetchdata/fetchdata'),
            nav: true,
            title: 'Fetch data'
        }, {
            route: 'geo-search-box',
            name: 'geosearchbox',
                settings: { icon: 'map-marker' },
                moduleId: PLATFORM.moduleName('../geosearchbox/geosearchbox'),
            nav: true,
            title: 'Geo Search (Bounding Box)'
            }, {
                route: 'geo-search-point',
                name: 'geosearchpoint',
                settings: { icon: 'map-marker' },
                moduleId: PLATFORM.moduleName('../geosearchpoint/geosearchpoint'),
                nav: true,
                title: 'Geo Search (Distance)'
            }
            ]);

        this.router = router;
    }
开发者ID:couchbaselabs,项目名称:blog-source-code,代码行数:42,代码来源:app.ts


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