36 Commits

Author SHA1 Message Date
George Kalpakas
3a46c2da7c refactor(docs-infra): update docs examples tslint.json to match CLI and fix failures ()
This commit updates the `tslint.json` configuration file, that is used
to lint the docs examples, to match the one generated for new Angular
CLI apps. There are some minimal differences (marked with `TODO`
comments) for things, such as component selector prefix, that would
require extensive and/or difficult to validate changes in guides.

This commit also includes the final adjustments to make the docs
examples code compatible with the new tslint rules. (The bulk of the
work has been done in previous commits.)

PR Close 
2020-07-31 11:00:06 -07:00
George Kalpakas
0a791e4a50 style(docs-infra): fix docs examples for tslint rule import-spacing ()
This commit updates the docs examples to be compatible with the
`import-spacing` tslint rule.

This is in preparation of updating the docs examples `tslint.json` to
match the one generated for new Angular CLI apps in a future commit.

PR Close 
2020-07-31 11:00:05 -07:00
George Kalpakas
1e3b8a1354 docs: remove unneeded code from universal example/guide ()
In the past, server-side rendered apps needed to convert URLs used in
API requests to absolute when rendering on the server. Originally, this
was handled in the `universal` guide and corresponding example app by
modifying the `HeroService` to use `APP_BASE_HREF` to derive the
absolute URL.

In , the guide was updated to show an improved method: Specifying
an `HttpInterceptor` that took care of converting the URLs to absolute.
That interceptor was only provided when rendering the app on the server.
By mistake, the corresponding example app was not updated along with the
guide.

Since `@nguniversal/*` v7.1.0, it is no longer necessary to convert the
URLs to absolute inside the app. This is handled in the `@nguniversal`
libs (see ).

This commit updates the example app to remove unnecessary code and
modifies the guide to mention the issue with absolute URLs, but explain
that developers only need to worry about it when not using one of the
`@nguniversal/*-engine` packages.

PR Close 
2020-04-16 09:43:42 -07:00
George Kalpakas
02bfa9e0e0 test(docs-infra): add tests for universal docs example ()
Previously, there were no tests for the `universal` docs example. This
meant that the project was not tested at all (not even ensuring that it
can be built successfully).

This commit adds e2e tests for the `universal` example (ported from
`toh-pt6` and cleaned up) and also verifies that the project can be
built successfully (including the server).

PR Close 
2020-04-16 09:43:41 -07:00
George Kalpakas
ec5c108b60 refactor(docs-infra): update universal example to match latest CLI ()
Update the `universal` example (and related files) to match what would
be generated by the latest CLI.

Fixes 

PR Close 
2020-04-16 09:43:41 -07:00
George Kalpakas
4d9da9b0a1 fix(docs-infra): align universal example with toh-pt6 ()
As mentioned in the `universal` guide, the `toh-pt6` examples is the
starting poitn for the `universal` example. However, the two examples
had become out-of-sync, because some fixes/changes were made to the
Tour-of-Heroes examples.

This commit ports these changes to the `universal` example.

PR Close 
2020-04-16 09:43:41 -07:00
George Kalpakas
d707124fd9 test(docs-infra): fix unit tests and run them for specific docs examples on CI ()
Previously, only e2e tests were run for docs examples on CI. As a
result, unit tests (which are included in the zipped archives we provide
for users to download and play with the examples locally) were often
outdated and broken.

This commit configures specific docs examples that have meaningful unit
tests to run them on CI (via the `run-example-e2e.js` script). Where
necessary, the unit tests are fixed to ensure they pass and reflect the
changes in the corresponding component/service.
This commit also removes some auto-generated unit tests that are not
meaningful (e.g. make trivial assertions, such that a component instance
is truthy) and are often broken anyway (e.g. because the corresponding
component has been changed in ways that make the tests fail).

PR Close 
2020-04-06 15:31:07 -07:00
George Kalpakas
f9bc84cd99 build(docs-infra): remove obsolete properties from zipper.json files ()
The `removeSystemJsConfig` and `type` properties (present in some
`zipper.json` files) are now obsolete and are not taken into account by
the example zipper:
- `removeSystemJsConfig` is no longer relevant since most examples have
  been migrated to use the CLI.
- `type` is no longer relevant, because the project type is determined
  based on the `projectType` property in `example-config.json` files.

This commit removes these properties from `zipper.json` files and
updates the `example-zipper` docs to not mention them.

PR Close 
2020-03-27 10:48:30 -07:00
George Kalpakas
c9fd8e39f3 build(docs-infra): update project structure to cli@9 6/12 (index.html) ()
Update `index.html` (mostly remove empty line).

PR Close 
2020-03-18 10:00:01 -07:00
Oleg Teterin
79742a397f fix(docs-infra): fix parameters with @Optional() decorator do not match declared, optional type ()
PR Close 
2020-02-07 09:58:31 -08:00
ajitsinghkaler
1217c6b7cc docs: replace class hero to interface wherever class properties not used ()
Fixes 

PR Close 
2019-11-25 11:37:39 -05:00
Alan Agius
755a80c7ec docs: update universal docs for new ivy implementation ()
PR Close 
2019-10-21 11:25:44 -04:00
janith
c79bffaacb docs: remove gender prefixes from examples ()
PR Close 
2019-05-20 16:42:59 -07:00
Brandon Roberts
661a57d9e2 docs: update docs example dependencies to version 8 ()
PR Close 
2019-05-17 14:16:55 -07:00
seunggabi
36e7bf1b7b style: change style css syntax ()
PR Close 
2018-11-29 21:26:53 -08:00
Nikhil Sharma
0d972d9bbf docs: update hero search component to use input event ()
PR Close 
2018-11-08 11:29:10 -08:00
Dario Braun
397530ab24 docs: remove code in universal hero detail component ()
This reverts commit e9cc3dad8f39bc8dfabfb708a825f90fcd2ab697.

PR Close 
2018-08-06 13:39:23 -07:00
Daniel Sogl
3f8ab80583 docs(aio): unified string chaining ()
PR Close 
2018-07-10 18:50:44 -07:00
Daniel Sogl
a167bca927 docs: unified console.log single string style ()
PR Close 
2018-07-10 11:11:29 -07:00
Jon Gear
67b8d57a8d docs(aio): use heroesUrl ()
PR Close 
2018-05-14 10:38:15 -07:00
Brandon Roberts
2cf6244b1d docs(aio): Upgrade server-side rendering example to Angular V6 ()
PR Close 
2018-05-02 16:51:03 -07:00
George Kalpakas
0224f1aaf3 refactor(aio): remove file that should not be tracked ()
PR Close 
2018-04-13 08:06:19 -07:00
Igor Minar
b43f8bc7d3 feat(core): upgrade rxjs to 6.0.0-alpha.4 ()
PR Close 
2018-03-19 21:51:51 -07:00
Enzo Volkmann
eeab433c8d docs: Fix platform-detection example for Universal ()
PR Close 
2018-01-31 10:21:04 -08:00
Shavi Pathania
0fedb57cb0 docs(aio): Clearing array with [] () ()
Clearing array with setting length to 0 replaced with [] for being short
and marginally efficient. For reference: [] is turned into a sequence of
around 15 machine instructions on x64 (if bump pointer allocation succeeds),
whereas a.length=0 is a C++ runtime function call, which requires 10-100x as
many instructions.
Benedikt Meurer

PR Close 
2017-11-16 16:19:35 -06:00
Jesus Rodriguez
3db7112b89 docs(aio): fix linting for universal ()
PR Close 
2017-11-02 00:51:29 +01:00
Jesus Rodriguez
c30eff898a docs(aio): update universal for CLI
PR Close 
2017-11-01 15:18:43 -07:00
Ward Bell
0ea5f8b5ed docs: add universal guide with production client app - with JK’s edits ()
PR Close 
2017-10-09 14:46:04 -07:00
Ward Bell
555b1cdf29 docs: add universal guide with production client app ()
Revises both universal and client build to use AOT and webpack for both.
Guide text adjusted accordingly
Dodges CLI client build, expected in near future.

PR Close 
2017-10-09 14:46:04 -07:00
Ward Bell
0b0d25fa33 docs: add universal guide ()
- based on original effort in PR 17573

PR Close 
2017-10-09 14:46:04 -07:00
Jesus Rodriguez
9bbf009dff build(aio): change examples to CLI ()
PR Close 
2017-09-21 17:05:54 -07:00
Brandon Roberts
8d01db4638 docs: Updated router guide content and examples for paramMap
and queryParamMap, tracing, and incidental improvements.
closes  and  which it also fixes.
2017-06-29 09:35:39 -07:00
David
400486ced7 docs(aio): correct typos in Tour of Heroes HeroSearchService 2017-06-22 14:55:17 -07:00
Peter Bacon Darwin
a0b30e5dfb docs(aio): remove example specific .gitignore files
All the files that should be ignored are defined in the
`aio/content/examples/.gitigore` folder.
2017-06-09 14:33:21 +01:00
Filipe Silva
bfd5f27525 feat(aio): add e2e ()
PR Close 
2017-04-19 22:36:23 -05:00
Jesus Rodriguez
0e38bf9de0 build(aio): new migration 2017-04-03 15:41:05 -07:00