Commit graph

79 commits

Author SHA1 Message Date
Matthieu Riegler
6b022428ad docs: improve AOT docs. (#50398)
Since v15, `protected` class member can be used in templates, Inputs & Outputs.

Other Decorated class members, like @HostBindings or Children queries can be private.

Fixes #27467

PR Close #50398
2023-05-22 17:34:46 +00:00
dario-piotrowicz
7c6b740b97 docs: fix … presented in aio code docs (#46123)
the symbol `…` displays correctly in code-example blocks and in
plain html text, it does however not work correctly for code espressed
using backticks, fix such occurrences by replacing `…` with `...`

PR Close #46123
2022-05-25 11:30:30 -07:00
Paul Gschwendtner
68a6a075f4 build: clean up references to old master branch (#45856)
Cleans up all references to the `master` branch we renamed to
`main` across Angular.

PR Close #45856
2022-05-04 16:23:33 -07:00
Joe Martin (Crowdstaffing)
42289f25c6 docs: improve markdown (#45325)
The purpose of the changes is to clean all markdown to match a single pedantic style.

*   To ensure all changes in style are properly separated.
*   To ensure all styled content aligns to nearest 4-character-tab.
*   To ensure all code blocks use the Angular `<code-example>` or `<code-tab>` elements.
*   To ensure all markdown exists outside of html tags.
*   To ensure all images use the Angular style for `<img>` elements.
*   To ensure that all smart punctuation is replaced or removed.

    ```text
    ’, ’, “, ”, –, —, …
    ```

*   To ensure all content does not conflict with the following reserved characters.

    ```text
    @, $, *, &, #, |, <, >,
    ```

*   To ensure all content displays using html entities.

The following changes were made to files in the following directory.

```text
aio/content
```

The target files were markdown files.
The list of excluded files:

```text
.browserslistrc, .css, .conf, .editorconfig, .gitignore, .html, .js, .json, .sh, .svg, .ts, .txt, .xlf,
```

PR Close #45325
2022-04-08 19:36:30 +00:00
Doug Parker
4ed8dc858a docs: remove Ivy-specific guides (#43860)
Ivy is the only supported rendering engine in v13, so there is no need to document the concept. Everything in Angular is Ivy. This starts the removal process by deleting Ivy-specific guides and references to them. It also updates the glossary to be more clear that Ivy is the current rendering engine while View Engine is simply a historical note.

This does not attempt to fully remove all references to "Ivy" or "View Engine", that will likely be a more involved clean up process.

PR Close #43860
2021-10-21 18:14:34 +00:00
Daniel Díaz
74ca3c5c7a docs: fix typo in AOT compiler (#43640)
PR Close #43640
2021-10-01 12:24:01 -04:00
JoostK
81d09d14dc docs: deprecate input setter coercion fields (#43506)
Since the `strictTemplates` flag has been introduced in Angular the
compiler has been able to type-check input bindings to the declared
input type of the corresponding directive. When a getter/setter pair is
being used for the input it may be desirable to let the setter accept a
broader set of types than what is returned by the getter, for example
when the setter first converts the input value. However, until
TypeScript 4.3 a getter/setter pair was required to have identical types
so this pattern could not be accurately declared.

To mitigate this limitation, it was made possible to declare
input setter coercion fields in directives that are used when
type-checking input bindings. However, since TypeScript 4.3 the
limitation has been removed; setters can now accept a wider type than
what is returned by the getter. This means that input coercion fields
are no longer needed, as their effects can be achieved by widening the
type of the setter.

PR Close #43506
2021-09-27 10:46:43 -07:00
David Shevitz
4e97514465 docs: remove references to future in topic (#42841)
Fixes #25704

PR Close #42841
2021-07-15 13:23:28 -07:00
Lars Gyrup Brink Nielsen
c93df7dc6d docs: correct literal string example (#42623)
Change literal string example `pi` to `'pi'`.

PR Close #42623
2021-06-28 10:05:09 -07:00
Teri Glover
635aaaa27d docs: Edited to remove jargon. (#41978)
PR Close #41978
2021-05-27 15:36:38 -07:00
Kuzivakwashe
19a484302d docs: Fix component decorator closing brackets (#38754)
PR Close #38754
2020-09-09 09:06:10 -07:00
Kapunahele Wong
5b31a0a294 docs: separate template syntax into multiple docs (#36954)
This is part of a re-factor of template syntax and
structure. The first phase breaks out template syntax
into multiple documents. The second phase will be
a rewrite of each doc.

Specifically, this PR does the following:

- Breaks sections of the current template syntax document each into their own page.
- Corrects the links to and from these new pages.
- Adds template syntax subsection to the left side NAV which contains all the new pages.
- Adds the new files to pullapprove.

PR Close #36954
2020-07-20 11:16:44 -07:00
David Shevitz 🔵
09d6dc50ef docs: Update documentation to reflect addition of tsconfig.base.json. (#37222)
In version 10, there is a new `tsconfig.json` file, which contains
the paths to all other `tsconfig` files used in a workspace. The
previous `tsconfig.json` file still exists, but has been renamed to
`tsconfig.base.json`.

In addition to documenting this change, I have updated files that
refer to TypeScript configuration files generically to remove specific
references to `tsconfig.json.` This should help avoid confusing users.

PR Close #37222
2020-06-15 09:37:00 -07:00
Judy Bogart
2cacab92e6 docs: correct typos in doc for template type guards (#37090)
correct some small typos in new feature recommendation in stuctural-directives.md and reference from aot-compiler.md

PR Close #37090
2020-05-13 16:01:20 -07:00
Judy Bogart
7addc9f1a9 docs: add doc for template type guards to stuctural-directives.md (#34549)
add new feature recommendation to existing content
include references from aot-compiler.md and template-typecheck.md

PR Close #34549
2020-05-12 14:40:01 -07:00
Santosh Yadav
7cc332efe6 docs: update aot compiler docs (#35487)
change to aot docs to include changes after angular 9
aot is true for new applications created, also it will
be updated to aot true once app is updated using ng update

PR Close #35487
2020-05-08 09:38:55 -07:00
Aristeidis Bampakos
9ca1faf865 docs: Fix minor typos and coding styles (#35325)
- Fix minor typos in the Getting Started, Forms and AOT Compiler guide.
- Fix minor typo in the Tour of Heroes app.
- Fix coding styles in the Getting Started guide and the Tour of Heroes app

PR Close #35325
2020-02-13 13:31:30 -08:00
Sonu Kapoor
f7e1c21596 docs: fix awkard space due to margin in sections with alert class (#35113)
PR Close #35113
2020-02-07 11:36:58 -08:00
Judy Bogart
efdf347f9c docs: apply standard header case convention (#34196)
PR Close #34196
2020-01-10 08:38:53 -08:00
Kapunahele Wong
a9e3cbd534 docs: add docs about inputs and strictNullChecks to template typecheck (#34194)
PR Close #34194
2019-12-12 15:58:13 -08:00
Judy Bogart
fba72f0d4d docs: rewrite ivy page, add template typecheck doc (#33152)
PR Close #33152
2019-10-30 10:39:26 -07:00
thanhpd
27745c5d8c docs: added missing whitespaces (#33424)
PR Close #33424
2019-10-29 11:40:48 -07:00
thanhpd
2f6c97e93c docs: remove redundant whitespaces and fix minor typos (#33422)
PR Close #33422
2019-10-29 11:39:17 -07:00
Alex Rickabaugh
f1269d98dc feat(ivy): input type coercion for template type-checking (#33243)
Often the types of an `@Input`'s field don't fully reflect the types of
assignable values. This can happen when an input has a getter/setter pair
where the getter always returns a narrow type, and the setter coerces a
wider value down to the narrow type.

For example, you could imagine an input of the form:

```typescript
@Input() get value(): string {
  return this._value;
}

set value(v: {toString(): string}) {
  this._value = v.toString();
}
```

Here, the getter always returns a `string`, but the setter accepts any value
that can be `toString()`'d, and coerces it to a string.

Unfortunately TypeScript does not actually support this syntax, and so
Angular users are forced to type their setters as narrowly as the getters,
even though at runtime the coercion works just fine.

To support these kinds of patterns (e.g. as used by Material), this commit
adds a compiler feature called "input coercion". When a binding is made to
the 'value' input of a directive like MatInput, the compiler will look for a
static field with the name ngAcceptInputType_value. If such a field is found
the type-checking expression for the input will use the static field's type
instead of the type for the @Input field,allowing for the expression of a
type conversion between the binding expression and the value being written
to the input's field.

To solve the case above, for example, MatInput might write:

```typescript
class MatInput {
  // rest of the directive...

  static ngAcceptInputType_value: {toString(): string};
}
```

FW-1475 #resolve

PR Close #33243
2019-10-24 09:49:38 -07:00
Danny Skoog
c507dda21a docs: correct sentence in AoT compiler guide (#33020)
PR Close #33020
2019-10-07 13:13:57 -07:00
Judy Bogart
7fed0faa44 docs: edit and organize aot doc (#32028)
PR Close #32028
2019-08-21 15:19:30 -07:00
Judy Bogart
0709ed4c2b docs: add doc for compiler options (#31829)
PR Close #31829
2019-08-05 13:01:10 -07:00
George Kalpakas
1bcd58cee8 refactor(docs-infra): remove linenums=false since it is now the default (#31674)
PR Close #31674
2019-07-24 14:38:54 -07:00
onlyflix
41e68f7a7a style: change to American English (#27266)
PR Close #27266
2019-01-29 16:30:25 -08:00
Giorgos Bamparopoulos
197676a6dd docs: rename "internal" access modifier to "protected" (#26627)
PR Close #26627
2019-01-22 11:20:26 -08:00
jenniferfell
beebf7fe14 docs: change links to cli wiki to link to new aio docs (#26489)
PR Close #26489
2018-10-17 11:06:34 -07:00
thanhpd
4006c9b6e6 docs: fix spelling errors (#26213)
PR Close #26213
2018-10-05 14:18:19 -07:00
Alan Agius
d7e5bbf2d0 feat(compiler-cli): add support to extend angularCompilerOptions (#22717)
`TypeScript` only supports merging and extending of `compilerOptions`. This is an implementation to support extending and inheriting of `angularCompilerOptions` from multiple files.

Closes: #22684

PR Close #22717
2018-09-19 16:17:28 -07:00
Alan Agius
379e8c5e19 docs: add disableTypeScriptVersionCheck documentation (#25537)
PR Close #25537
2018-09-11 12:25:55 -07:00
Vani
89af5291de docs: move compiler options to last section of the page (#22353)
PR Close #22353
2018-09-10 10:30:00 -07:00
Stefanie Fluin
d523630ea2 docs(aio): cleanup aalert, callout, subsection use and author style (#24986)
PR Close #24986
2018-07-24 08:22:14 -07:00
Alan Agius
32da3e1602 docs: add explanation for enableResourceInlining (#24644)
PR Close #24644
2018-06-27 14:31:53 -07:00
Noah Medling
8d0ee34939
docs: corrected spelling of "ambient". 2018-04-24 15:04:50 -07:00
Juan Camilo Giraldo Chaverra
221ae6998a docs(aio): fix typo on AOT compiler section 2018-04-13 00:06:26 -07:00
Igor Minar
5db9ab12c0
docs: fix skipTemplateCodeGen -> skipTemplateCodegen typo in the AOT compiler guide 2018-04-04 23:12:28 -07:00
Veres Lajos
de90314304 style: typos fixed - https://github.com/vlajos/misspell-fixer (#22975)
PR Close #22975
2018-03-27 14:51:53 -04:00
Jinhyuk Kim
f461f43d72 docs: fix a typo in aot compiler guide (#22876)
PR Close #22876
2018-03-21 13:20:51 -07:00
Victor Berchet
0ebd577db4 refactor(compiler): Drop support for the deprecated <template>. Use <ng-template> instead (#22783)
BREAKING CHANGE:

The `<template>` tag was deprecated in Angular v4 to avoid collisions (i.e. when
using Web Components).

This commit removes support for `<template>`. `<ng-template>` should be used
instead.

BEFORE:

    <!-- html template -->
    <template>some template content</template>

    # tsconfig.json
    {
      # ...
      "angularCompilerOptions": {
        # ...
        # This option is no more supported and will have no effect
        "enableLegacyTemplate": [true|false]
      }
    }

AFTER:

    <!-- html template -->
    <ng-template>some template content</ng-template>

PR Close #22783
2018-03-15 14:52:22 -07:00
Oussama Ben Brahim
f1a063298e feat(core): set preserveWhitespaces to false by default (#22046)
Fixes #22027

PR Close #22046
2018-02-16 09:06:14 -08:00
Oussama Ben Brahim
eb48750705 docs(aio): fix typo in "preserveWhitespaces" example (#22182)
Fixes #22147

PR Close #22182
2018-02-12 15:57:42 -08:00
Bernd Hacker
72265f796f fix(aio): missing plural s in preserveWhiteSpaces example (#21854)
PR Close #21854
2018-01-29 11:35:13 -08:00
Chuck Jazdzewski
64d16dee02 feat(compiler): implement "enableIvy" compiler option (#21427)
The "enableIvy" compiler option is the initial implementation
of the Render3 (or Ivy) code generation. This commit enables
generation generating "Hello, World" (example in the test)
but not much else. It is currenly only useful for internal Ivy
testing as Ivy is in development.

PR Close #21427
2018-01-18 18:22:44 -06:00
George Kalpakas
bf248792eb docs: minor fixes (anchor tags, redundant whitespace, consistent code-snippets lang) (#21589)
PR Close #21589
2018-01-18 18:22:20 -06:00
Kapunahele Wong
53f91189a1 docs(aio): add NgModule docs (#20306)
PR Close #20306
2018-01-10 16:26:46 -08:00
chembu
e99475260f docs(aio): document the template compiler options (#21333)
PR Close #21333
2018-01-08 13:23:16 -05:00