The new router once required TS1.9 but it doesn't anymore. It's best to revert our examples to TS 1.8 since that is what we tell users to install, and we want to be testing on the current setup.
Originally the dashboard TS expression ``heroes.slice(1, 5))` had been
written as:
> _heroService.getHeroes().getRange(1, 5)
which is brittle; it fails if there are not enough heroes. Slice
doesn't fail; an equivalent express
ion in Dart is
> _heroService.getHeroes().skip(1).take(4)
This is now used.
Other changes:
- Fix in css (missed TS-side update).
- Ran `dartfmt` on `heroes_component.dart`.
Mainly Dart-side review, following #1654:
- Updates to follow style guide
- Enabled e2e tests
- Fixes to ensure tests pass: in after_view_component.dart and
after_content_component.dart
- Changed test over comment field in template to be:
*ngIf="comment.isNotEmpty"
- Suites passed:
public/docs/_examples/lifecycle-hooks/dart
public/docs/_examples/lifecycle-hooks/ts
* docs(toh-6/dart): first edition of prose and example code
NOTE: this PR depends on #1686.
Dart prose and example match TS except that:
- No child-to-parent event emission occurs.
- Support for Add Hero is added as an unconditional feature of the
Heroes view.
- http `_post` takes only a name
- http `delete` takes only a hero id.
- The Dart in-memory-data-service has been dropped in favor of an
implementation based on the "standard" `http.testing.MockClient` class.
* post-review changes
`LoggerService` implies that it will be written as such in the code, yet the hero.service.ts example has a service simply called `Logger` (which matches the Style Guide).
Mainly Dart-side review, following #1654:
- Updates to follow style guide
- Suites passed:
public/docs/_examples/user-input/dart
public/docs/_examples/user-input/ts
Note: the click-me2 component is not mentioned in the prose, maybe it
should be.
* docs(toh-6/ts): minor edits and enhancements
Changes to prose:
- Complete TODO item of displaying `heroes.component` errors.
- Mainly copyedits.
- Add of blocks statements so that prose can be used on Dart side.
- Show excerpt and briefly explain of changes (previously missing):
- `app/hero-detail.component.html`
- `app/heroes.component.ts` error handling
- Add missing file to changed/added files listing and makeTabs
- `toh-6/ts/app/in-memory-data.service.ts,
- `toh-6/ts/sample.css`
Code changes:
- Mainly copyedits
- Renamed `heroes.component.ts` `delete` to `deleteHero` to match
naming of other methods
* remove unnecessary change relative to toh-5