本文整理匯總了TypeScript中@angular/forms.disableDeprecatedForms函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript disableDeprecatedForms函數的具體用法?TypeScript disableDeprecatedForms怎麽用?TypeScript disableDeprecatedForms使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了disableDeprecatedForms函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: bootstrap
import { bootstrap } from '@angular/platform-browser-dynamic';
import { HTTP_PROVIDERS } from "@angular/http";
import { provideForms,disableDeprecatedForms } from "@angular/forms";
import { appRouteProviders } from "./app.routes";
import { AppComponent } from './app.component';
bootstrap(AppComponent,[appRouteProviders,HTTP_PROVIDERS,provideForms(),disableDeprecatedForms()]);
示例2: bootstrap
import { bootstrap } from '@angular/platform-browser-dynamic';
import { AppComponent } from './app.component';
import { disableDeprecatedForms,provideForms } from '@angular/forms';
bootstrap(AppComponent,[disableDeprecatedForms(),provideForms()]).catch((err:any)=>console.error(err));
示例3: enableProdMode
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppComponent } from './app.component';
enableProdMode();
/* THIS IS PART OF THE NEW ANGULAR2 FORMS. IT WON'T BE NECESSARY ONCE THE DEPRECATION PROCESS IS FINISHED */
import { disableDeprecatedForms, provideForms } from '@angular/forms';
bootstrap(AppComponent, [ disableDeprecatedForms(),
provideForms()
]);
示例4: bootstrap
import { bootstrap } from '@angular/platform-browser-dynamic';
import { AppComponent } from './app.component';
import { ROUTER_PROVIDERS } from '@angular/router-deprecated';
import { disableDeprecatedForms, provideForms } from '@angular/forms';
import { HTTP_PROVIDERS } from '@angular/http';
bootstrap(AppComponent, [HTTP_PROVIDERS, ROUTER_PROVIDERS, disableDeprecatedForms(), provideForms()]);
示例5: enableProdMode
if(UI[key]) {
platformDirectives.push(UI[key]);
}
}
import {PlatformUI, DomUI} from 'backlive/utility/ui';
import {AppExceptionHandler} from 'backlive/utility';
declare var WEB_CONFIG:any;
if(!WEB_CONFIG.Development) {
enableProdMode();
}
import {AppComponent} from './component/app.component';
bootstrap(AppComponent, serviceBootstrap.concat([APP_ROUTER_PROVIDERS, HTTP_PROVIDERS, Title, provide(APP_BASE_HREF, {useValue: WEB_CONFIG.SiteUrl}), disableDeprecatedForms(), provideForms(),
provide(PlatformUI, {useClass: DomUI}), provide(PLATFORM_DIRECTIVES, {useValue: platformDirectives, multi:true})/*provide(CompilerConfig, {useValue: new CompilerConfig({ platformDirectives: platformDirectives, platformPipes: platformPipes })})*/,
provide(ExceptionHandler, {useClass: AppExceptionHandler})]))
.catch(err => console.error(err));
//platform([WORKER_APP_PLATFORM]).application([WORKER_APP_APPLICATION, WORKER_APP_ROUTER, provide(APP_BASE_HREF, { useValue: '/' })]).bootstrap(AppComponent, []);
/*platform(WORKER_APP_PLATFORM).asyncApplication(() => Promise.resolve([
WORKER_APP_APPLICATION,
WORKER_APP_ROUTER,
provide(APP_BASE_HREF, { useValue: '/' }),
provide(PLATFORM_DIRECTIVES, {useValue: platformDirectives, multi:true})
]))
.then((appRef: ApplicationRef) => {
return appRef.bootstrap(AppComponent, serviceBootstrap.concat([HTTP_PROVIDERS]));
})
.then((compRef: ComponentRef) => {
示例6: beforeEach
beforeEach(() => addProviders([
disableDeprecatedForms(),
provideForms(),
RioForm
]));
示例7: require
import {bootstrap} from '@angular/platform-browser-dynamic'
import {provide, Component, enableProdMode} from '@angular/core';
import {disableDeprecatedForms, provideForms} from '@angular/forms';
import {
LocationStrategy,
HashLocationStrategy,
APP_BASE_HREF} from '@angular/common';
var routes = require('./scripts/routes');
var app = require('./scripts/components/app');
//
// Bootstrap
//
enableProdMode();
bootstrap(app.AppComponent, [
routes.appRouterProviders,
disableDeprecatedForms(), provideForms(),
provide(LocationStrategy, { useClass: HashLocationStrategy }),
provide(APP_BASE_HREF, { useValue: '/' })
]);
示例8: bootstrap
//external modules
import { bootstrap } from '@angular/platform-browser-dynamic';
import { disableDeprecatedForms, provideForms } from '@angular/forms';
import { Logger } from 'angular2-logger/core';
//internal modules
import { AppComponent } from './app.component';
import { APP_ROUTER_PROVIDERS } from './app.routes';
bootstrap(AppComponent, [
Logger, //logging service
APP_ROUTER_PROVIDERS, //tanımlanmış route'ları register ediyoruz
disableDeprecatedForms(), //eski form handler, yeni versiyon geçildiğinde kaldırılabilir
provideForms() //yeni form provider
])
.then((msg: any) => console.debug('Application Loaded'))
.catch((err: any) => console.error('[Application Load Error] ' + err));
示例9: bootstrap
// main.ts
import { bootstrap } from '@angular/platform-browser-dynamic';
import { disableDeprecatedForms, provideForms } from '@angular/forms';
import { HTTP_PROVIDERS } from '@angular/http';
import { ROUTER_DIRECTIVES } from '@angular/router';
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
import { TalkService } from "./talkService";
import { TalksComponent } from './TalksComponent';
import { talkRoutes } from './routes';
bootstrap(TalksComponent, [disableDeprecatedForms(),
provideForms(),
TalkService,
HTTP_PROVIDERS,
ROUTER_DIRECTIVES,
talkRoutes,
{ provide: LocationStrategy, useClass: HashLocationStrategy }
]);
示例10: bootstrap
import { bootstrap } from '@angular/platform-browser-dynamic';
import { AppComponent } from './app.component';
import {ROUTER_BINDINGS} from '@angular/router-deprecated';
import { disableDeprecatedForms, provideForms } from '@angular/forms';
bootstrap(AppComponent, [ROUTER_BINDINGS, disableDeprecatedForms(), provideForms()])
.catch(err => console.log(err));