feat(dart/transform): Use angular2/platform/browser as bootstrap lib

Update the Angular 2 transformer to recognize
`package:angular2/platform/browser.dart` as the library which exports
the `bootstrap` function.

Update playground, examples, benchmarks, & tests to import bootstrap from
platform/browser.

Closes #7647
This commit is contained in:
Tim Blasi
2016-03-17 12:49:46 -07:00
committed by Timothy Blasi
parent c194f6695d
commit b6507e37ef
77 changed files with 130 additions and 88 deletions

View File

@ -4,7 +4,7 @@ Bootstrapping
@description
{@target ts}`import {bootstrap} from 'angular2/platform/browser';`{@endtarget}
{@target js}Available from the `ng.platform.browser` namespace{@endtarget}
{@target dart}`import 'package:angular2/bootstrap.dart';`{@endtarget}
{@target dart}`import 'package:angular2/platform/browser.dart';`{@endtarget}
@cheatsheetItem
syntax(ts dart):

View File

@ -1,5 +1,5 @@
import {provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {UrlResolver} from 'angular2/compiler';
var MyApp: any;

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {NG_VALIDATORS} from 'angular2/common';
import {Provider} from 'angular2/core';

View File

@ -1,5 +1,5 @@
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Observable, Subscriber} from 'rxjs/Rx';
// #docregion AsyncPipe

View File

@ -1,5 +1,5 @@
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
// #docregion DatePipe
@Component({

View File

@ -1,5 +1,5 @@
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
// #docregion JsonPipe
@Component({

View File

@ -1,5 +1,5 @@
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
// #docregion LowerUpperPipe
@Component({

View File

@ -1,5 +1,5 @@
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
// #docregion NumberPipe
@Component({

View File

@ -1,5 +1,5 @@
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
// #docregion SlicePipe_string
@Component({

View File

@ -1,6 +1,6 @@
// #docregion enableProdMode
import {enableProdMode} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {MyComponent} from './my_component';
enableProdMode();

View File

@ -1,5 +1,5 @@
import {provide, Component} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {
CanActivate,
RouteConfig,

View File

@ -1,5 +1,5 @@
import {provide, Component} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {
CanDeactivate,
RouteConfig,

View File

@ -1,5 +1,5 @@
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {
OnActivate,
ComponentInstruction,

View File

@ -1,5 +1,5 @@
import {Component, Injectable, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {
OnDeactivate,
ComponentInstruction,

View File

@ -1,5 +1,5 @@
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {
CanActivate,
RouteConfig,

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {BrowserDomAdapter} from 'angular2/src/platform/browser/browser_adapter';
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
import {PromiseWrapper} from 'angular2/src/facade/async';

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component, Directive, DynamicComponentLoader, ElementRef} from 'angular2/core';
import {NgIf, NgFor} from 'angular2/common';
import {ApplicationRef} from 'angular2/src/core/application_ref';

View File

@ -7,7 +7,7 @@ import {
windowProfile,
windowProfileEnd
} from 'angular2/src/testing/benchmark_util';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component, Directive, bind, provide} from 'angular2/core';
import {NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/common';
import {ApplicationRef} from 'angular2/src/core/application_ref';

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {App} from './app';

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {NgIf} from 'angular2/common';
import {
Compiler,

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {
Compiler,
Component,

View File

@ -1,5 +1,5 @@
import {Component} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
@Component({
selector: 'hello-app',

View File

@ -1,5 +1,5 @@
import {AnimateApp} from './animate-app';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
export function main() {
bootstrap(AnimateApp);

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component} from 'angular2/core';
import {NgIf} from 'angular2/common';
import {TimerWrapper} from 'angular2/src/facade/async';

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component} from 'angular2/core';
@Component({selector: 'gestures-app', templateUrl: 'template.html'})

View File

@ -1,5 +1,5 @@
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {
RouteConfig,
Route,

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Renderer, ElementRef, Component, Directive, Injectable} from 'angular2/core';
export function main() {

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {HTTP_PROVIDERS} from 'angular2/http';
import {HttpCmp} from './http_comp';

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {JSONP_PROVIDERS} from 'angular2/http';
import {JsonpCmp} from './jsonp_comp';

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component} from 'angular2/core';
import {KeyEventsPlugin} from 'angular2/src/platform/dom/events/key_events';

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {
FORM_DIRECTIVES,
ControlGroup,

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {
Component,
Directive,

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component, Directive, Host, forwardRef, Provider, Injectable} from 'angular2/core';
import {NgIf, NgFor, FORM_DIRECTIVES} from 'angular2/common';

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Renderer, ElementRef, Component, Directive, Injectable} from 'angular2/core';
import {MyCmp} from './my_cmp/my_cmp';

View File

@ -1,6 +1,6 @@
import {InboxApp} from './inbox-app';
import {provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {ROUTER_PROVIDERS, HashLocationStrategy, LocationStrategy} from 'angular2/router';
export function main() {

View File

@ -1,5 +1,5 @@
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component} from 'angular2/core';
@Component({

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component} from 'angular2/core';
@Component({selector: '[svg-group]', template: `<svg:text x="20" y="20">Hello</svg:text>`})

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component, Directive, Host, forwardRef, Provider} from 'angular2/core';
import {
ControlGroup,

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component} from 'angular2/core';
import {NgFor} from 'angular2/common';
import {Store, Todo, TodoFactory} from './services/TodoStore';

View File

@ -1,4 +1,4 @@
import {bootstrap} from "angular2/bootstrap";
import {bootstrap} from "angular2/platform/browser";
import {ImageDemo} from "./index_common";
export function main() {

View File

@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/bootstrap';
import {bootstrap} from 'angular2/platform/browser';
import {Component} from 'angular2/core';
import {Zippy} from './zippy';