You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.
~~~We alternatively could also rename it to just `bootstrap`, or similar.~~~
Some background:
* The runtime (reflective) compiler is being completely removed. Compilation is required.
* Right now there are two bootstrap methods, one uses `dart:mirrors`.
* DDC has no support for `dart:mirrors`, and it is highly discouraged for dart2js.
_Internal users, you use a different build process, so please ignore anything remarking pub transformers. Thanks!_
## Don't require importing platform/*.dart
Both `bootstrap` and `bootstrapStatic` should be exported by `angular2.dart`. This removes having to remember or understand why they are in separate files, which doesn't make sense in AngularDart, especially after the runtime compiler is deleted.
## Changes to bootstrap(...)
`bootstrap` should be a no-op function that throws a runtime exception if used. For example:
```dart
Future<ComponentRef> bootstrap(Type appComponentType, [List providers]) {
throw new UnsupportedError('Using the AngularDart transformer is required. See <url>.');
}
```
Once transformed, it will actually refer to `bootstrapStatic`, i.e.:
```dart
import 'package:angular2/angular2.dart';
void main() {
bootstrap(HelloWorldComponent);
}
```
Gets re-written to:
```dart
import 'package:angular2/angular2.dart';
import 'main.template.dart' as ng;
void main() {
bootstrapStatic(HelloWorldComponent, [], ng.initReflector);
}
```
Users can also hand-write the transformed output if they prefer to.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: