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:
@ -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):
|
||||
|
@ -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;
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
|
||||
// #docregion DatePipe
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
|
||||
// #docregion JsonPipe
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
|
||||
// #docregion LowerUpperPipe
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
|
||||
// #docregion NumberPipe
|
||||
@Component({
|
||||
|
@ -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({
|
||||
|
@ -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();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {provide, Component} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {
|
||||
CanActivate,
|
||||
RouteConfig,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {provide, Component} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {
|
||||
CanDeactivate,
|
||||
RouteConfig,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {
|
||||
OnActivate,
|
||||
ComponentInstruction,
|
||||
|
@ -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,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {
|
||||
CanActivate,
|
||||
RouteConfig,
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
|
||||
import {App} from './app';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {NgIf} from 'angular2/common';
|
||||
import {
|
||||
Compiler,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {
|
||||
Compiler,
|
||||
Component,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
|
||||
@Component({
|
||||
selector: 'hello-app',
|
||||
|
@ -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);
|
||||
|
@ -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';
|
||||
|
@ -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'})
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {
|
||||
RouteConfig,
|
||||
Route,
|
||||
|
@ -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() {
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {
|
||||
FORM_DIRECTIVES,
|
||||
ControlGroup,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {
|
||||
Component,
|
||||
Directive,
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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() {
|
||||
|
@ -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({
|
||||
|
@ -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>`})
|
||||
|
@ -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,
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {bootstrap} from "angular2/bootstrap";
|
||||
import {bootstrap} from "angular2/platform/browser";
|
||||
import {ImageDemo} from "./index_common";
|
||||
|
||||
export function main() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {Component} from 'angular2/core';
|
||||
import {Zippy} from './zippy';
|
||||
|
||||
|
Reference in New Issue
Block a user