本文整理匯總了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) {