本文整理汇总了TypeScript中@angular/platform-browser-dynamic.platformBrowserDynamic函数的典型用法代码示例。如果您正苦于以下问题:TypeScript platformBrowserDynamic函数的具体用法?TypeScript platformBrowserDynamic怎么用?TypeScript platformBrowserDynamic使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了platformBrowserDynamic函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: platformBrowserDynamic
{ path: 'contact', component: ContactComponent },
{ path: 'protected', component: ProtectedComponent,
canActivate: [LoggedInGuard]}
];
@NgModule({
declarations: [
RoutesDemoApp,
HomeComponent,
AboutComponent,
ContactComponent,
ProtectedComponent,
LoginComponent
],
imports: [
BrowserModule,
FormsModule,
RouterModule.forRoot(routes) // <-- routes
],
bootstrap: [ RoutesDemoApp ],
providers: [
AUTH_PROVIDERS,
LoggedInGuard,
{ provide: LocationStrategy, useClass: HashLocationStrategy },
]
})
class RoutesDemoAppModule {}
platformBrowserDynamic().bootstrapModule(RoutesDemoAppModule)
.catch((err: any) => console.error(err));
开发者ID:johedl,项目名称:Angular2,代码行数:30,代码来源:app.ts
示例2: platformBrowserDynamic
///<reference path="./../../../typings/index.d.ts"/>
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './module';
platformBrowserDynamic().bootstrapModule(AppModule).then((result) => {
// console.log('result', result);
console.log('Bootstrap loaded');
});
开发者ID:uqutub,项目名称:server-client-boilerplate,代码行数:9,代码来源:main.ts
示例3: platformBrowserDynamic
import { enableProdMode } from "@angular/core";
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
import { AppModule } from "./app.module";
//enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);
开发者ID:dppower,项目名称:angular2-resizable-canvas,代码行数:6,代码来源:main.ts
示例4: platformBrowserDynamic
.then(() => {
const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);
})
开发者ID:guusdk,项目名称:keycloak,代码行数:4,代码来源:main.ts
示例5: enableProdMode
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import { enableAkitaProdMode } from '@datorama/akita';
if (environment.production) {
enableProdMode();
enableAkitaProdMode();
}
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.log(err));
开发者ID:emmanuj,项目名称:akita,代码行数:15,代码来源:main.ts
示例6: platformBrowserDynamic
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {CatalogModule} from './catalog.module';
platformBrowserDynamic().bootstrapModule(CatalogModule);
开发者ID:vhromada,项目名称:Catalog-Angular,代码行数:4,代码来源:main.ts
示例7: platformBrowserDynamic
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import 'bootstrap/dist/css/bootstrap.css';
// App component
import { SampleDateAppModule } from "./sample-date-app/index";
platformBrowserDynamic().bootstrapModule(SampleDateAppModule);
开发者ID:akmittal,项目名称:angular2-datepicker,代码行数:6,代码来源:main.ts
示例8: enableProdMode
import 'reflect-metadata';
import 'babel-polyfill';
import 'core-js/es6';
import 'core-js/es7/reflect';
import '../shims/shims_for_IE';
import 'zone.js/dist/zone';
import 'ts-helpers';
// The browser platform with a compiler
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
// The app module
import {RioSampleAppModule} from './app/sample-app.module';
import {enableProdMode} from '@angular/core';
if (__PRODUCTION__) {
enableProdMode();
} else {
require('zone.js/dist/long-stack-trace-zone');
}
if (!__TEST__) {
// Compile and launch the module
platformBrowserDynamic().bootstrapModule(RioSampleAppModule);
}
开发者ID:mattmcfad,项目名称:angular2-redux-starter,代码行数:25,代码来源:index.ts
示例9: platformBrowserDynamic
document.body.addEventListener('bootstrap', () => {
platformBrowserDynamic().bootstrapModule(AppModule);
});
开发者ID:ericel,项目名称:goaf,代码行数:3,代码来源:main.ts
示例10: main
export function main() {
platformBrowserDynamic().bootstrapModule(ExampleModule);
}
开发者ID:AlmogShaul,项目名称:angular,代码行数:3,代码来源:index.ts
注:本文中的@angular/platform-browser-dynamic.platformBrowserDynamic函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论