本文整理匯總了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
];
示例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
];