refactor(WebWorker): Make WebWorker bootstrap synchronous
BREAKING CHANGE From the app thread, in both TypeScript and Dart, you bootstrap the app using `application` instead of `asyncApplication`. Before: ```TypeScript platform([WORKER_APP_PLATFORM]) .asyncApplication(setupWebWorker, optionalProviders?) .then((ref) => ref.bootstrap(RootComponent)); ``` Now: ```TypeScript platform([WORKER_APP_PLATFORM]) .application([WORKER_APP_APPLICATION]) .bootstrap(RootComponent); ``` closes #5857 Closes #5862
This commit is contained in:
@ -84,7 +84,7 @@ class WebSocketWrapper {
|
||||
_socket.addStream(_sendStream.stream);
|
||||
}
|
||||
|
||||
void send (String data) {
|
||||
void send(String data) {
|
||||
_sendStream.add(data);
|
||||
}
|
||||
|
||||
|
@ -9,15 +9,12 @@ import 'package:angular2/src/facade/lang.dart';
|
||||
import 'package:angular2/src/facade/exceptions.dart';
|
||||
|
||||
class GenericMessageBus implements MessageBus {
|
||||
final MessageBusSink _sink;
|
||||
final MessageBusSource _source;
|
||||
|
||||
MessageBusSink get sink => _sink;
|
||||
MessageBusSource get source => _source;
|
||||
MessageBusSink sink;
|
||||
MessageBusSource source;
|
||||
|
||||
GenericMessageBus(MessageBusSink sink, MessageBusSource source)
|
||||
: _sink = sink,
|
||||
_source = source;
|
||||
: sink = sink,
|
||||
source = source;
|
||||
|
||||
void attachToZone(NgZone zone) {
|
||||
sink.attachToZone(zone);
|
||||
|
Reference in New Issue
Block a user