本文整理汇总了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));