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
This PR upgrades the existing forms to the new API,
while leaving a copy for existing users.
The current forms will be the default until RC4, at
which point we will switch the default to the new API
but still retain a link to the old forms API.
After RC5 the old API docs will be completely removed.
Reduce amount of watchers for `gulp serve-and-sync-devguide` by roughly 50% (~4900-ish to ~2500).
This should help with the 100% CPU usage #1082, on my machine it went from ~90% to ~50%.
At the end of the day we're still watching an insane amount of files, so it is a demanding process. Maybe using better watcher libs would also help.
Fix#1684
While looking at this, I saw that plunkers were getting some unintended unit testing files and added them to the default plunker builder ignore.