當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript index.disableDeprecatedForms函數代碼示例

本文整理匯總了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"]' })));
    });
開發者ID:benetis,項目名稱:color_picker,代碼行數:25,代碼來源:name-list.service.spec.ts

示例2: beforeEach

 beforeEach(() => { providerArr = [disableDeprecatedForms(), provideForms()]; });
開發者ID:martinsvb,項目名稱:Angular2_bootstrap_seed,代碼行數:1,代碼來源:app.component.spec.ts

示例3: provideForms

t.be(() => { providerArr = [disableDeprecatedForms(), provideForms()]; });
開發者ID:BlackMr,項目名稱:androidLauncher,代碼行數:1,代碼來源:support.component.spec.ts

示例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) {
開發者ID:AntonFLB,項目名稱:FoodDiary,代碼行數:31,代碼來源:main.ts


注:本文中的@angular/forms/index.disableDeprecatedForms函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。