-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(bootstrap): fix expressions containing bootstrap (fixes #3309)
- Loading branch information
Showing
6 changed files
with
70 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
modules/angular2/test/transform/reflection_remover/bootstrap_files/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Tests that the reflection removal step: | ||
1. Comments out reflective `bootstrap.dart` import | ||
1. Adds `bootstrap_static.dart` import | ||
1. Adds the call to `initReflector` | ||
1. Handles bootstrap return values properly |
19 changes: 19 additions & 0 deletions
19
modules/angular2/test/transform/reflection_remover/bootstrap_files/expected/index.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
library angular2.test.transform.reflection_remover.reflection_remover_files; | ||
|
||
// This file is intentionally formatted as a string to avoid having the | ||
// automatic transformer prettify it. | ||
// | ||
// This file represents transformed user code. Because this code will be | ||
// linked to output by a source map, we cannot change line numbers from the | ||
// original code and we therefore add our generated code on the same line as | ||
// those we are removing. | ||
|
||
var code = """ | ||
library web_foo; | ||
import 'package:angular2/bootstrap_static.dart';import 'index.ng_deps.dart' as ngStaticInit0; | ||
void main() async { | ||
var appRef = await bootstrapStatic(MyComponent, null, () { ngStaticInit0.initReflector(); }); | ||
} | ||
"""; |
7 changes: 7 additions & 0 deletions
7
modules/angular2/test/transform/reflection_remover/bootstrap_files/index.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
library web_foo; | ||
|
||
import 'package:angular2/bootstrap.dart'; | ||
|
||
void main() async { | ||
var appRef = await bootstrap(MyComponent); | ||
} |