angular-cn/aio/content/guide
George Kalpakas 1b38b413de docs: fix indentation of code snippets in the "Cheat sheet" guide (#41051)
Previously, the indentation of code snippets in the "Cheat sheet" guide
was done using regular spaces. However, leading whitespace is ignored in
HTML elements (by default), which resulted in the identation being lost.

This commit fixes this by using the ` ` HTML entity for
indentation, ensuring the code snippets are easier to read.

Some examples:

Before: ![cheatsheet code indentation before][1]
After: ![cheatsheet code since PR 40944][2]

[1]: https://user-images.githubusercontent.com/8604205/109385242-218dd600-78fb-11eb-9261-18ab5f2c308c.png
[2]: https://user-images.githubusercontent.com/8604205/109385246-25b9f380-78fb-11eb-8e82-d8a561deba21.png

PR Close #41051
2021-03-09 08:52:51 -08:00
..
accessibility.md docs: remove superfluous "NOTE:" (#39933) 2020-12-02 14:55:27 -08:00
ajs-quick-reference.md docs: rewrite structural-directives.md (#40015) 2021-03-01 15:32:26 -08:00
angular-compiler-options.md docs: fix grammar in angular-compiler-options file (#40879) 2021-02-17 06:56:38 -08:00
animations.md docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
aot-compiler.md docs: Fix component decorator closing brackets (#38754) 2020-09-09 09:06:10 -07:00
aot-metadata-errors.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
app-shell.md docs: update App Shell guide to reflect its actual behavior (#40210) 2020-12-21 10:21:00 -08:00
architecture-components.md docs: rewrite structural-directives.md (#40015) 2021-03-01 15:32:26 -08:00
architecture-modules.md docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
architecture-next-steps.md docs: deprecate displaying data in views topic (#38885) 2020-10-15 14:05:28 -07:00
architecture-services.md docs: edit di providers doc (#39403) 2020-11-20 09:24:51 -08:00
architecture.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
attribute-binding.md docs: update attribute-binding.md to correctly describe [attr.binding] rules (#40878) 2021-02-17 17:05:17 -08:00
attribute-directives.md docs: edit attribute-directives.md, move best practice to styleguide (#39849) 2021-02-19 08:14:54 -08:00
binding-syntax.md docs: fix styles in binding guides (#40182) 2020-12-21 10:22:31 -08:00
bootstrapping.md docs: change wrong default app module by ng new (#38549) 2020-09-21 12:25:28 -07:00
browser-support.md docs: remove mention of unused `Intl` polyfill (#40883) 2021-02-17 17:04:15 -08:00
build.md docs: clarify that fileReplacements only supports compilation source files (#40687) 2021-02-03 09:10:23 -08:00
built-in-directives.md docs: rewrite structural-directives.md (#40015) 2021-03-01 15:32:26 -08:00
cheatsheet.md docs: fix indentation of code snippets in the "Cheat sheet" guide (#41051) 2021-03-09 08:52:51 -08:00
cli-builder.md docs: correct some spellings (#40322) 2021-01-06 07:31:33 -08:00
comparing-observables.md refactor(docs-infra): fix docs examples for tslint rule `prefer-const` (#38143) 2020-07-31 11:00:06 -07:00
complex-animation-sequences.md docs: remove redundant whitespaces and fix minor typos (#33422) 2019-10-29 11:39:17 -07:00
component-interaction.md docs: separate template syntax into multiple docs (#36954) 2020-07-20 11:16:44 -07:00
component-overview.md docs(core): fix typo in component overview (#40269) 2021-01-05 13:55:43 -08:00
component-styles.md docs: extend :host selector documentation (#41055) 2021-03-08 08:36:04 -08:00
creating-libraries.md docs: fix builder section of generated angular.json file for libs (#39888) 2020-11-30 12:10:12 -08:00
dependency-injection-in-action.md docs: edit di providers doc (#39403) 2020-11-20 09:24:51 -08:00
dependency-injection-navtree.md docs: archive di-navtree doc (#39543) 2020-11-12 13:52:04 -08:00
dependency-injection-providers.md docs: fix interchanged values (#40302) 2021-01-05 09:46:56 -08:00
dependency-injection.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
deployment.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
deprecations.md docs(forms): Deprecate legacy options for FormBuilder.group (#39769) 2020-11-25 14:28:11 -08:00
docs-style-guide.md docs: update docs-style-guide (#36281) 2021-02-09 14:26:06 -08:00
dynamic-component-loader.md refactor(docs-infra): fix docs examples for Angular-specific tslint rules (#38143) 2020-07-31 11:00:06 -07:00
dynamic-form.md docs: add links to TypeScript (#40410) 2021-01-13 14:02:32 -08:00
elements.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
entry-components.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
event-binding-concepts.md build(docs-infra): implement full template checking for examples (#40930) 2021-02-26 15:40:44 -08:00
event-binding.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
example-apps-list.md docs: rewrite structural-directives.md (#40015) 2021-03-01 15:32:26 -08:00
feature-modules.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
file-structure.md docs: use kebab-case for CLI commands (#40240) 2020-12-23 08:36:32 -08:00
form-validation.md docs: add links to TypeScript (#40410) 2021-01-13 14:02:32 -08:00
forms-overview.md docs: add links to TypeScript (#40410) 2021-01-13 14:02:32 -08:00
forms.md docs: add links to TypeScript (#40410) 2021-01-13 14:02:32 -08:00
frequent-ngmodules.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
glossary.md docs: rewrite structural-directives.md (#40015) 2021-03-01 15:32:26 -08:00
hierarchical-dependency-injection.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
http.md docs(http): add example for interceptor order (#39938) 2021-03-01 15:33:36 -08:00
i18n.md docs: add a `@reviewed` tag to the i18n guide (#40582) 2021-01-28 09:04:49 -08:00
inputs-outputs.md docs: added a missing ` in inputs-outputs.md (#39856) 2020-11-30 11:14:01 -08:00
interpolation.md docs: rewrite structural-directives.md (#40015) 2021-03-01 15:32:26 -08:00
ivy-compatibility-examples.md docs: explain foreign function/value constraints in Ivy compatibility examples (#36092) 2020-11-24 13:09:37 -08:00
ivy-compatibility.md docs: add update information for v11 release (#39607) 2020-11-09 12:20:34 -08:00
ivy.md docs: update docs to use new zone.js entry-points (#40823) 2021-02-24 07:58:29 -08:00
language-service.md docs(language-service): Add note about Eclipse IDE support of Angular LS (#40551) 2021-02-10 11:05:52 -08:00
lazy-loading-ngmodules.md docs: Add documentation about the CLI failing (#35385) 2021-02-16 08:04:05 -08:00
libraries.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
lifecycle-hooks.md docs: edit Component lifecycle title (#40894) 2021-02-19 09:10:37 -08:00
lightweight-injection-tokens.md docs: the token should be associated with LibHeaderComponent (#40922) 2021-02-19 09:07:00 -08:00
migration-dynamic-flag.md docs: remove https://angular.io from internal links (#37157) 2020-05-19 10:11:41 -07:00
migration-injectable.md docs: fix migrations formatting (#33267) 2019-12-05 13:06:01 -08:00
migration-localize.md docs: fix migrations formatting (#33267) 2019-12-05 13:06:01 -08:00
migration-module-with-providers.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
migration-renderer.md docs: fix migrations formatting (#33267) 2019-12-05 13:06:01 -08:00
migration-undecorated-classes.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
migration-update-libraries-tslib.md docs: updating guides and docs related to the v10 release (#37705) 2020-06-24 09:37:34 -07:00
migration-update-module-and-target-compiler-options.md docs: remove solution style tsconfig (#38394) 2020-08-11 16:32:20 -07:00
module-types.md docs: Refactor module-types.md to make it easier to understand (#38206) 2020-07-28 10:01:37 -07:00
ngmodule-api.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
ngmodule-faq.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
ngmodule-vs-jsmodule.md docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
ngmodules.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
npm-packages.md docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
observables-in-angular.md docs: edit inputs-outputs copy and headers (#39119) 2020-11-13 11:26:27 -08:00
observables.md docs: clarify observables recommendation (#39237) 2021-02-10 11:04:04 -08:00
pipes.md docs: HTTP in HttpClient should not be written in uppercase (#40195) 2020-12-21 14:21:32 -08:00
practical-observable-usage.md fix(docs-infra): rename "title" by "header" to avoid unwanted tooltips (#26396) 2018-10-17 11:05:29 -07:00
property-binding-best-practices.md docs: edit property binding doc (#38799) 2020-10-21 08:23:42 -07:00
property-binding.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
providers.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
reactive-forms.md docs: add links to TypeScript (#40410) 2021-01-13 14:02:32 -08:00
releases.md docs: clarify that support schedule is subject to change (#40770) 2021-02-12 16:14:52 -08:00
reusable-animations.md docs: remove https://angular.io from internal links (#37157) 2020-05-19 10:11:41 -07:00
roadmap.md docs: update the roadmap with our priorities at Q4 (#39635) 2020-11-11 15:44:44 -08:00
route-animations.md docs(animations): Added consistency in code examples (#37081) 2020-07-09 22:08:00 +00:00
router-tutorial-toh.md docs: remove duplicated 'the' (#40333) 2021-01-07 13:09:34 -08:00
router-tutorial.md docs(router): fix minor grammatical issue (#40380) 2021-01-11 09:57:34 -08:00
router.md docs: fix typo in router.md file (#41064) 2021-03-03 09:36:06 -08:00
rx-library.md test(docs-infra): add unit tests for rx-library examples (#38905) 2020-09-28 16:20:11 -04:00
schematics-authoring.md docs(core): update links to schema.json of @schematics/angular (#39827) 2020-11-24 10:50:30 -08:00
schematics-for-libraries.md docs: fix the docs because the interface does not exist (#40308) 2021-01-25 16:29:13 -08:00
schematics.md docs: make page titles and toc task-oriented (#36024) 2020-04-01 13:16:48 -07:00
security.md docs: Change lexical in security guide (#41016) 2021-02-26 15:14:57 -08:00
service-worker-communications.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
service-worker-config.md feat(service-worker): add the option to prefer network for navigation requests (#38565) 2020-09-22 09:29:20 -07:00
service-worker-devops.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
service-worker-getting-started.md docs(service-worker): copyedit getting started guide (#40543) 2021-02-09 10:34:15 -08:00
service-worker-intro.md docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
set-document-title.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
setup-local.md docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
sharing-ngmodules.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
singleton-services.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
static-query-migration.md docs: remove https://angular.io from internal links (#37157) 2020-05-19 10:11:41 -07:00
strict-mode.md docs: update the link to the TypeScript documentation for strict mode (#40063) 2020-12-10 14:16:23 -08:00
structural-directives.md docs: rewrite structural-directives.md (#40015) 2021-03-01 15:32:26 -08:00
style-precedence.md docs: fix typos in the Style Precedence guide (#39560) 2020-12-09 09:02:14 -08:00
styleguide.md docs: remove Codelyzer recommendation from style guide (#40992) 2021-03-04 11:01:48 -08:00
svg-in-templates.md docs: Return SVG topic to documentation; light edits for clarity (#40487) 2021-01-19 14:18:51 -08:00
template-expression-operators.md docs: archive template expression operators doc, move pipes precedence section (#39170) 2020-11-24 08:41:18 -08:00
template-reference-variables.md docs: rewrite structural-directives.md (#40015) 2021-03-01 15:32:26 -08:00
template-statements.md docs: rewrite structural-directives.md (#40015) 2021-03-01 15:32:26 -08:00
template-syntax.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
template-typecheck.md feat(compiler-cli): Add compiler option to report errors when assigning to restricted input fields (#38249) 2020-08-11 09:55:48 -07:00
test-debugging.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
testing-attribute-directives.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
testing-code-coverage.md docs: fix live examples in testing guides (#38038) 2020-07-14 09:10:00 -07:00
testing-components-basics.md docs: fix typo in the testing component basics guide (#38573) 2020-08-25 09:55:59 -07:00
testing-components-scenarios.md docs: update docs to use new zone.js entry-points (#40823) 2021-02-24 07:58:29 -08:00
testing-pipes.md docs: fix live examples in testing guides (#38038) 2020-07-14 09:10:00 -07:00
testing-services.md docs: fix live examples in testing guides (#38038) 2020-07-14 09:10:00 -07:00
testing-utility-apis.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
testing.md fix(docs-infra): improve heading styles (#40427) 2021-02-02 12:04:55 -08:00
transition-and-triggers.md docs: remove https://angular.io from internal links (#37157) 2020-05-19 10:11:41 -07:00
two-way-binding.md docs: fix typo in two-way-binding guide (#39859) 2020-11-30 11:15:02 -08:00
typescript-configuration.md docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
universal.md docs: remove solution style tsconfig (#38394) 2020-08-11 16:32:20 -07:00
updating-to-version-11.md docs: add update information for v11 release (#39607) 2020-11-09 12:20:34 -08:00
updating.md docs: remove the release schedule from docs (#34474) 2020-02-06 14:29:21 -08:00
upgrade-performance.md docs: apply standard header case convention (#34196) 2020-01-10 08:38:53 -08:00
upgrade-setup.md docs: update docs to use new zone.js entry-points (#40823) 2021-02-24 07:58:29 -08:00
upgrade.md docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
user-input.md docs: update docs to use new zone.js entry-points (#40823) 2021-02-24 07:58:29 -08:00
using-libraries.md docs: Grammar fixes (#38900) 2020-09-18 16:52:52 -07:00
view-encapsulation.md docs(core): fix typos in the "View Encapsulation" guide (#39246) 2020-12-08 08:53:36 -08:00
visual-studio-2015.md docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
web-worker.md docs: update web-worker CLI commands to bash style (#38421) 2020-08-12 11:24:35 -07:00
what-is-angular.md docs: update @reviewed date (#41060) 2021-03-03 10:03:57 -08:00
workspace-config.md docs: update inlineCritical default value (#40920) 2021-02-26 15:41:15 -08:00
zone.md docs: update docs to use new zone.js entry-points (#40823) 2021-02-24 07:58:29 -08:00