当前位置: 首页>>代码示例>>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;未经允许,请勿转载。