當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript webpack-toolkit.provideWebpack函數代碼示例

本文整理匯總了TypeScript中@angularclass/webpack-toolkit.provideWebpack函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript provideWebpack函數的具體用法?TypeScript provideWebpack怎麽用?TypeScript provideWebpack使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了provideWebpack函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: disableDeprecatedForms



import { routes, asyncRoutes, prefetchRouteCallbacks } from '../app/app.routes';
import { APP_RESOLVER_PROVIDERS } from '../app/app.resolver';
import { AUTH_PROVIDERS } from 'angular2-jwt/angular2-jwt';

/*
 * Application Providers/Directives/Pipes
 * providers/directives/pipes that only live in our browser environment
 */
export const APPLICATION_PROVIDERS = [
    // new Angular 2 forms
    disableDeprecatedForms(),
    provideForms(),

    ...APP_RESOLVER_PROVIDERS,

    provideRouter(routes),
    provideWebpack(asyncRoutes),
    providePrefetchIdleCallbacks(prefetchRouteCallbacks),

    ...HTTP_PROVIDERS,
    ...AUTH_PROVIDERS,
    
    { provide: LocationStrategy, useClass: HashLocationStrategy }
];

export const PROVIDERS = [
    ...APPLICATION_PROVIDERS
];
開發者ID:Macavity,項目名稱:iro-client,代碼行數:28,代碼來源:browser-providers.ts

示例2: disableDeprecatedForms

import { provideWebpack } from '@angularclass/webpack-toolkit';
import { providePrefetchIdleCallbacks } from '@angularclass/request-idle-callback';


import { ROUTING } from '../app/app.routes';
import { APP_RESOLVER_PROVIDERS } from '../app/app.resolver';
/*
* Application Providers/Directives/Pipes
* providers/directives/pipes that only live in our browser environment
*/
export const APPLICATION_PROVIDERS = [
	// new Angular 2 forms
	disableDeprecatedForms(),
	provideForms(),

	...APP_RESOLVER_PROVIDERS,

	provideRouter(ROUTING._ROUTES),
	provideWebpack(ROUTING._ASYNC_ROUTE),
	providePrefetchIdleCallbacks(ROUTING._ROUTE_CALLBACK),

	...HTTP_PROVIDERS,

	{ provide: LocationStrategy, useClass: PathLocationStrategy }
	// { provide: LocationStrategy, useClass: HashLocationStrategy }
];

export const PROVIDERS = [
	...APPLICATION_PROVIDERS
];
開發者ID:RocketInno,項目名稱:rocketinno-web,代碼行數:30,代碼來源:browser-providers.ts


注:本文中的@angularclass/webpack-toolkit.provideWebpack函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。