本文整理汇总了TypeScript中@angular/forms/index.disableDeprecatedForms函数的典型用法代码示例。如果您正苦于以下问题:TypeScript disableDeprecatedForms函数的具体用法?TypeScript disableDeprecatedForms怎么用?TypeScript disableDeprecatedForms使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了disableDeprecatedForms函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: beforeEach
beforeEach(() => {
providerArr = [disableDeprecatedForms(), provideForms()];
let injector = ReflectiveInjector.resolveAndCreate([
disableDeprecatedForms(),
provideForms(),
HTTP_PROVIDERS,
NameListService,
BaseRequestOptions,
MockBackend,
provide(Http, {
useFactory: function(backend: ConnectionBackend, defaultOptions: BaseRequestOptions) {
return new Http(backend, defaultOptions);
},
deps: [MockBackend, BaseRequestOptions]
}),
]);
nameListService = injector.get(NameListService);
backend = injector.get(MockBackend);
let connection: any;
backend.connections.subscribe((c: any) => connection = c);
initialResponse = nameListService.get();
connection.mockRespond(new Response(new ResponseOptions({ body: '["Dijkstra", "Hopper"]' })));
});
示例2: beforeEach
beforeEach(() => { providerArr = [disableDeprecatedForms(), provideForms()]; });
示例3: provideForms
t.be(() => { providerArr = [disableDeprecatedForms(), provideForms()]; });
示例4: bootstrap
import { HTTP_PROVIDERS } from '@angular/http';
import { bootstrap } from '@angular/platform-browser-dynamic';
import { APP_ROUTER_PROVIDERS } from './app.routes';
import { AppComponent } from './app.component';
import { MODAL_BROWSER_PROVIDERS } from 'angular2-modal/platform-browser/index'
if ('<%= ENV %>' === 'prod') { enableProdMode(); }
/**
* Bootstraps the application and makes the ROUTER_PROVIDERS and the APP_BASE_HREF available to it.
* @see https://angular.io/docs/ts/latest/api/platform-browser-dynamic/index/bootstrap-function.html
*/
bootstrap(AppComponent, [
disableDeprecatedForms(),
provideForms(),
MODAL_BROWSER_PROVIDERS,
HTTP_PROVIDERS,
APP_ROUTER_PROVIDERS,
{
provide: APP_BASE_HREF,
useValue: '<%= APP_BASE %>'
}
]);
// In order to start the Service Worker located at "./worker.js"
// uncomment this line. More about Service Workers here
// https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers
//
// if ('serviceWorker' in navigator) {