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