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


TypeScript platform-browser.bootstrap函數代碼示例

本文整理匯總了TypeScript中@angular/platform-browser.bootstrap函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript bootstrap函數的具體用法?TypeScript bootstrap怎麽用?TypeScript bootstrap使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了bootstrap函數的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: main

export function main() {
  bootstrap(AppCmp);
}
開發者ID:0xJoKe,項目名稱:angular,代碼行數:3,代碼來源:lowerupper_pipe_example.ts

示例2: main

export function main() {
  bootstrap(RelativeApp);
}
開發者ID:0xJoKe,項目名稱:angular,代碼行數:3,代碼來源:index.ts

示例3: bootstrap

import {NG_VALIDATORS} from '@angular/common';
import {bootstrap} from '@angular/platform-browser';

let MyApp: Function = null;
let myValidator: any = null;

// #docregion ng_validators
bootstrap(MyApp, [{provide: NG_VALIDATORS, useValue: myValidator, multi: true}]);
// #enddocregion
開發者ID:Brantner,項目名稱:angular,代碼行數:9,代碼來源:ng_validators.ts

示例4: bootstrap

import {Component} from '@angular/core';
import {bootstrap} from '@angular/platform-browser';

@Component({selector: 'hello-world', template: 'hello world!!!'})
class HelloWorldComponent {
}

bootstrap(HelloWorldComponent);
開發者ID:0xJoKe,項目名稱:angular,代碼行數:8,代碼來源:hello_world.ts

示例5: main

document.addEventListener('DOMContentLoaded', function main() {
  return bootstrap(ExampleApp, [
    ...ENV_PROVIDERS
  ])
  .catch(err => console.error(err));
});
開發者ID:hmlb,項目名稱:ng2-dragula,代碼行數:6,代碼來源:bootstrap.ts

示例6: main

export function main() {
  bootstrap(AnimateApp);
}
開發者ID:davewragg,項目名稱:angular,代碼行數:3,代碼來源:index.ts

示例7: enableProdMode

import {enableProdMode, SystemJsComponentResolver, ComponentResolver,} from '@angular/core';
import {bootstrap} from '@angular/platform-browser';
import {PeriscopeAppComponent, environment} from './app';
import {RuntimeCompiler} from '@angular/compiler';
import {provideRouter} from '@angular/router';

const routes = [
  {
    path: '/triage_pr',
    component: './app/+triage-pr',
  },
  {path: '/sync', component: './app/+sync'}
];


if (environment.production) {
  enableProdMode();
}

bootstrap(PeriscopeAppComponent, [
  provideRouter(routes),
  {
    provide: ComponentResolver,
    useFactory: (r) => new SystemJsComponentResolver(r),
    deps: [RuntimeCompiler]
  },
]);
開發者ID:IgorMinar,項目名稱:periscope,代碼行數:27,代碼來源:main.ts

示例8: main

export function main() {
  bootstrap(ImageDemo);
}
開發者ID:0xJoKe,項目名稱:angular,代碼行數:3,代碼來源:single_thread.ts

示例9: bootstrap

import {bootstrap} from '@angular/platform-browser';
import {NG_VALIDATORS} from '@angular/common';
import {Provider} from '@angular/core';

let MyApp: Function = null;
let myValidator: any = null;

// #docregion ng_validators
bootstrap(MyApp, [new Provider(NG_VALIDATORS, {useValue: myValidator, multi: true})]);
// #enddocregion
開發者ID:0xJoKe,項目名稱:angular,代碼行數:10,代碼來源:ng_validators.ts


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