* since RC5 the webpack prod build is defect
Issue #10618 recommends 'mangle: { keep_fnames: true, screw_ie8: true } for the webpack UglifyJs plugin
* remove screw_ie8 option
removed the screw_ie8: true option because it is not necessary
* docs(toh-6/dart): refactoring of 'add, edit, delete heroes'
Refactoring of "add, edit, delete heroes" section of toh-6 from one big
bottom-up step into small independent feature slices, where the user
achieves a "milesone" (i.e., can run the full app) after each feature
section. The section rewrite is shorter and offers a better UX.
Other simplifications:
- Error handling is consistent: in the hero service we log to the
console, everwhere else we just let errors bubble up.
- Hero service methods renamed based on function (create, update)
rather then lower-level implementation (post, put).
- @Output properties have been eliminated (since they weren't
explained).
E2E tests now pass on both the TS and Dart sides.
* docs(toh-6/ts): refactoring of 'add, edit, delete heroes'
Refactoring of "add, edit, delete heroes" section of toh-6 from one big
bottom-up step into small independent feature slices, where the user
achieves a "milesone" (i.e., can run the full app) after each feature
section. The section rewrite is shorter and offers a better UX.
Other simplifications:
- Error handling is consistent: in the hero service we log to the
console, everwhere else we just let errors bubble up.
- Hero service methods renamed based on function (create, update)
rather then lower-level implementation (post, put).
- @Output properties have been eliminated (since they weren't
explained).
E2E tests now pass on both the TS and Dart sides.
Post-Dart-review updates included.
* docs(toh-6): ward tweaks
* example(dart/toh-4,5): getHeroesSlowly() to return getHeroes()
Have `getHeroesSlowly()` delay and then return the value of
`getHeroes()`. This makes it easier for user’s performing the tutorial
to keep this slower method as they evolve toh-5 into toh-6.
* example(ts/toh-4,5): getHeroesSlowly() to return getHeroes()
Have `getHeroesSlowly()` delay and then return the value of
`getHeroes()`. This makes it easier for user’s performing the tutorial
to keep this slower method as they evolve toh-5 into toh-6.
* docs(server-communication): Fix typo in example
Clearly we're transforming the response, not the request.
* docs(server-communication): Fix typo in example
Clearly we're transforming the response, not the request.
* lifecycle-hooks: copy latest to cache
* docs(lifecycle-hooks): post-RC5 Dart resync
- TS prose: removed mention of `routerOnActivate` which no longer
exists in the new router.
- TS improvements to the sample code have also been propagated to the
Dart sample.
Contributes to #2077.
E2E tests pass now.
* post-review updates
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes#1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
closes#2110
The lifecycle-hooks provided by router-deprecated has already been removed in the router, the router now uses guards rather than lifecycle-hooks to achieve the same work.
* docs(toh-5): review and update/resync Dart
**NOTE: run `gulp add-example-boilerplate` after pulling in the
commit.**
This is preparatory work for #2035.
As part of the the chapter review, the Dart .jade was enhanced to use
Jade extends (#2018).
By the same token it contributed to a post-RC5 resync (#2077). Other
key changes:
Dart and TS code:
- Eliminated `styles.1.css` in favor of docregions in `styles.css`.
- `docregion` tags renamed in a few places.
- **No other code changes**.
TS prose
- Fixed: misnamed variable `routing` -> `appRoutes`.
- All other changes are **minor copy edits**, or changes to support
Dart via Jade extends.
Diff of generated HTML for TS chapter was inspected to ensure only
minor copy edits prevailed (i.e., that the support for Jade extends had
no impact on the generated HTML).
* docs(toh-5): edits after doing tutorial
- Some adjustments following actually doing the tutorial. In some cases code shown (e.g. this is what file foo should look like now) didn't match what the user would have. E.g., lingering @Input on the hero property.
- Fixed some lingering deprecated-router prose elements on TS side (e.g., still referring to a route by the old string names like `HeroDetail`).
- Added extra step to `app.component.ts` creation rather than having a critical-call-out later on.
- Reorder some prose for better harmony between TS and Dart prose (also improves the flow).
- Moved the `styleUrls` call-out to the point of first use.
* post-review changes
* more post-review changes
* toh-6 cache update
* chore(toh-5): improve e2e test coverage
Improved test coverage. Also updated tests to make use of async/await
(so tests are more readable).
* lint feedback
* toh-6: trim spaces from cache file to simplify diff
* toh-6: copy latest over cache before editing latest
* docs(toh-6): post-RC5 Dart resync and TS fixes
Contributes to #2077.
TS-side changes include:
- Merged three versions of `app/app.module{,1,2}.ts` into a single file
and used docregions instead.
- Misnamed files:
- `rxjs-operators.ts` -> `rxjs-extensions.ts`
- `hero-search.service.html` -> `hero-search.component.html`
- Fixed BAD FILENAME error.
Lint reports no errors and toh-6 e2e tests pass.
* docs(router): fix markdown and example mixin cleanup
- Fixed: markdown text not under `:marked` region (and so that text was
not showing up in the generated html).
- Fixed: code excerpt title `constructor` -> `isSelected`.
- Cleanup of all makeExample mixin uses.
This cleanup will help make it easier to record differences with the
deprecated router chapter (which must have app-relative makeExample
paths).
* post-review updates
Found another instance of markdown (a heading) outside of a `:marked` region.
* docs(template-syntax/dart): enhancements to example code
Enhancements to `NgStyle` section in support of its API docs.
- Add feature supporting interactive update of a paragraph’s style.
- Add full type declarations.
- Replace bogus implementation of `getStyles()`.
* dartfmt updates
* docs(quickstart): post-RC5 Dart resync
- Resync Dart QS prose with TS, post RC5.
- Added to-be-shared Jade `var` definitions to `_util-fns.jade`.
- Delete cached QS jade file.
- Eliminate the stub file `styles.1.css` in favor of a `docregion` in
the main `styles.css`.
This commit requires a `gulp add-example-boilerplate` after pulling it in.
Contributes to #2077.
* post-review edits
closes#1751
Move additional styles from `sample.css` to `hero-search.component.css`.
Edit tutorial to reflect the removal of `sample.css` and the change to `heroes.component.css`.
Edit tutorial to reflect the addition of `hero-search.component.css` file.
Edit `hero-search.component.ts` to include styles from `hero-search.component.css`.
Remove reference to `/public/docs/_examples/toh-6/ts/sample.css` from `/public/docs/_examples/toh-6/ts/index.html`.
closes#2008
Changes:
- Drop `asObservable()` since it is deprecated in RxJS 5 (see the
[migration
guide](https://github.com/ReactiveX/RxJS/blob/master/MIGRATION.md#operat
ors-renamed-or-removed)).
- Drop `+` from hero search query URL: `app/heroes/?name=${term}+`. At
best it is interpreted as a regex op that serves no purpose, at worst,
it gets interpreted as a space (cf. [HTML 4.01 section
17.13.4](https://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4)
).
- Rename `searchSubject` to `searchTerms`
- Other minor tweaks to prose.
This work is in preparation for #1924.
Note: toh-6 tests pass.
Waterloo ENGL 210 J Student
Changed order of text in pipe operator to introduce pipe operator
Changed word choice/word location in pope operator
Added : before examples to keep consistent
Waterloo ENGL 210J Student
Line 44: Changed tense
Line 54: Changed wording of second sentence to not start with 'and'. Added DOM meaning (Document Object Model)
closes#1940
Note: tests are identical to those of toh-2.
Contributes to #1619.
Supersedes #1785.
Suites passed:
- public/docs/_examples/toh-4/dart
- public/docs/_examples/toh-4/ts
closes#1939
Contributes to #1619.
Note: tests are identical to those of toh-2.
Suites passed:
- public/docs/_examples/toh-3/dart
- public/docs/_examples/toh-3/ts
* chore(ng2/dart): update from beta.1x to beta.18
Update made to all `pubspec.yaml` files and to relevant prose.
Note that pipes was back a beta.15; the rest were at beta.17.
* chore(pipes/dart): update ngFor microsyntax and transform method param
Updates to pipe example source code:
- Pipe `transform()` method parameters
- `ngFor` microsyntax, from `#` to `let`
Misc fixes to problems with the tutorial examples, as detected by the new e2e tests. Now the toh-4 index.html is identical to those of the previous parts.
Fixes#1609.
closes#1905
Added section for RouterLinkActive
Added section for global query params and fragments
Added section for RouterState
Added wildcard route to example configuration
Updated code samples
Renamed .guard files to .service
Renamed interfaces.ts to can-deactivate-guard.service.ts
Removed unused files
closes#1807
- e2e tests now also cover the tax calculator.
- Dart app updated to match TS (it had no sales tax calculator).
- TS sample source cleanup (e.g. removed many unnecessary `docregions`).
- Prose updated to include @kwalrath's revisions from a while ago, Ward's comments, and
some of my edits as well.
Contributes to #1598 and #1508.
closes#1832
The shred map (xref) builder was issuing warnings. This fix includes
- Adjustments to the shredder map builder itself so that it
understands, e.g., app-project relative example paths.
- `**/guide/glossary.jade` now (Jade) `includes` the shared parent
`glossary.jade` rather than (Harp) importing (via `partial`). This
fixes `makeExample` path issues in the glossary.
- Adjusted some `makeExample` paths that were ok for site build, but
confused the xref tool.
* docs(displaying-data/dart): proofread
- Dart prose simplified by removing discussion of "additions to
pubspec.yaml" which are no longer necessary given the current state of
QuickStart.
- E2e suites passed:
public/docs/_examples/displaying-data/dart
public/docs/_examples/displaying-data/ts
Contributes to #1598 and #1508.
* docs(displaying-data/ts): proofread
- TS prose updated to include @kwalrath's revisions from a while ago,
with some of my edits as well.
- E2e suites passed:
public/docs/_examples/displaying-data/dart
public/docs/_examples/displaying-data/ts
* docs(displaying-data/ts): post-review edits
closes#1818
Previously, the markdown of some chapters was converted to Jade markup
to support the conditional exclusion of TS prose parts in Dart
chapters. This commit reverts some of that back to clean markdown,
thanks to a few custom directives.
- Renamed `angular2_getting_started` to `angular2_quickstart` (to match
TS).
- s/-/_/g in project names elsewhere (only toh-5 & -6 needed to be
updated).
Fixes#378.
- App now shows how Angular handles untrusted URLs and resources
- E2e test covered new functionality
- Copyedits to prose
- Updated provider expressions to use latest syntax
The original security feature tracker:
https://github.com/angular/angular/issues/8511
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
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.
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.
The `heroDetail` directive is shown as an example of a component directive, such as those built using the `.component()` helper in v1.5+. In order for the directive to be functionaly equivalent with the component directive created with `.component`, it needs to be restricted to elements only. (If the `restrict` is omitted, it defaults to `'AE'`, which would also match attributes.)
/cc @teropa
The serve-and-sync tasks wait for `_copy-example-boilerplate` to finish
Differentiates app compile, spec compile, and test failures
StyleGuide (for documentators) up-to-date
Update gulpfile and project to add a tsconfig to protractor test folders
Change all sample e2e-spec.js -> e2e-spec.ts
Split typings between e2e-spec & app code
Use same config for all e2e tests
Only 1/3 e2e specs truly converted.
Most don't pass because they fail TS transpile by Protractor due to missing type annotations
This only impacts language dependent variable and path definitions:
- Removed deprecated variable.
- Hoisted useful variable definitions from quickstart into _util-fns.
- Minor fix in regexp of path translation function
closes#1538
This is a major reorganization of the Upgrade guide.
* Compatible with the new version of the AngularJS 1 PhoneCat
tutorial.
* No longer switching Angular 1 code to SystemJS for PhoneCat,
to allow beginning Angular 2 migration with fewer preparation
steps. SystemJS switch now happens simultaneously with upgrade.
(This is based on input from @joeeames)
* Testing moved to an appendix to make the main narrative
shorter and easier to follow.
* Use component methods to do phone filtering and ordering
instead of introducing pipes to replace filterFilter and orderByFilter.
* Cover issue with camelCase inputs on downgraded components.
For authors:
* All examples now fully integrated with the example boilerplate. Uses the
same Angular 2 version as all other guides. E2E tests are executed
along with all the others.
* Reduced number of PhoneCat versions from five to three.
* Each directory has a README explaining how to run it and what might
be peculiar about it.
Closesangular/angular#8622
Relates to angular/angular.js#14416
Relates to angular/angular-phonecat#326
- Dart code: fix issues raised by @thso during review.
- Dart code: remove "show x" clauses from imports.
- Dart add docsync config file.
- Prose: make consistent use of _Http variables; otherwise use "HTTP".
- Prose: add links to the demos list.
* _heroesUrl as static const
This fixes various issues such as:
- missing space in Dart version between the live demo and demo source
links.
- Live example link directing to Plunker for Dart.
The main mixins (`liveExampleLink`*) used to support the generation of
links now assume reasonable default values for their arguments, and in
most cases the defaults are used.
* Dart example links: use http vs https
As agree to with @kwalrath.
Be more DRY when referencing examples and excerpts. E.g.,
```jade
+makeExcerpt('quickstart/ts/app/app.component.ts', 'import',
'app/app.component.ts (import)')
```
can now be just
```jade
+makeExcerpt('app/app.component.ts', 'import')
```
Defined new mixin for examples named `makeProjExample` using this new
scheme.
The original `makeExample` has been left untouched.
Applied new mixins to quickstart.
closes#1420
+ guide/pipes/ts: update docs and example code
+ guide/pipes/dart: new prose, updated example code
+ fix platform_directives reference; html cleanup
+ enable pipes e2e testing
For `e2e-spec.js`: If the async test is executed too early it will fail
(simply because the async message hasn’t been received yet).
+ follow new constants naming convention
New Dart prose, update Dart and Ts code
+ guide/server-communication/ts: update to docs and example code
+ guide/server-communication/dart: new prose, update example code
+ ignore all npm-debug.logs
+ make Jade ul li TOC elements more compact.
Mainly copyedits, but also
- Dart .jade extends TS .jade file with minor overrides
- Significant update of example code (so it matches the ts example in its
appearance and behavior).
- Tweaks to Dart code.
- A few extra/corrected mixin definitions in `_util-fns.jade`.
Change `ngFor=“#…”` to `ngFor=“let…` in code. All are .dart files
except for `app_component.html` which also has changes for:
- `<inpuf var-foo…`> to `<input ref-foo…>`
- `#docregion` tag name updates from var-foo to ref-foo.
- Other misc updates to minimize diffs with TS version of file,
whitespace differences were ignored.
+ Minor update to sync up Dart prose with TS prose.
+ Used
https://github.com/angular/angular/wiki/Angular-2-Dart-Transformer#resol
ved_identifiers to solve
https://github.com/angular/angular.io/issues/1033
Guide/pipes not updated as it will be rolled back to
beta.15 in PR #1220.
closes#1192
Updated docs and samples to beta.16.
For this first time, among other things, I payed particular attention
to the changes that were made on the `ts` side of things
(https://github.com/angular/angular.io/pull/1178). Since I wrote it up
in my notes, here is the check list of `ts` updates with notes about
how there might be corresponding changes on the Dart side:
- public/docs/_examples/cb-dependency-injection/ts/app/main.ts
- public/docs/_examples/cb-ts-to-js/ts/app/main.ts
- cb not in Dart docs yet.
- public/docs/_examples/dependency-injection/ts/app/car/car-injector.ts
-
public/docs/_examples/dependency-injection/ts/app/injector.component.ts
- Updated Dart example code to avoid null argument.
- public/docs/_examples/homepage-hello-world/ts/index.1.html
- public/docs/_examples/homepage-tabs/ts/index.1.html
- public/docs/_examples/homepage-todo/ts/index.1.html
- public/docs/_examples/package.json
- N/A for Dart.
- public/docs/_examples/pipes/ts/app/app.component.html
- public/docs/_examples/pipes/ts/app/app.component.ts
- public/docs/_examples/pipes/ts/app/exponential-strength.pipe.ts
- public/docs/_examples/pipes/ts/app/fetch-json.pipe.ts
- public/docs/_examples/pipes/ts/app/random-pipe.component.ts
- Dart version of sample code is incomplete, but did run in beta.15.
- Example no longer runs, see
https://github.com/angular/angular/issues/8258
- public/docs/_examples/quickstart/js/package.1.json
- public/docs/_examples/quickstart/ts/package.1.json
- public/docs/_examples/router/ts/app/main.2.ts
- public/docs/_examples/testing/ts/app/mock-router.ts
- N/A for Dart.
- public/docs/js/latest/_data.json
- public/docs/ts/latest/_data.json
- Dart equivalent updated.
- public/docs/ts/latest/guide/dependency-injection.jade
- No need to update since it imports the TS version.
- public/docs/ts/latest/guide/pipes.jade
- Not in Dart prose yet.
- tools/plunker-builder/indexHtmlTranslator.js
- N/A for Dart.
* A full first version of the prose. Makes use of Dart example, of
course.
* Tweaks to Dart example code; manually tested in Dartium under checked
mode.
closes#1142