本文整理汇总了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
];