Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adev/src/content/guide/forms/template-driven-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ To see how the classes are added and removed by the framework, open the browser'
1. When you first bring it up, the classes indicate that it has a valid value, that the value has not been changed since initialization or reset, and that the control has not been visited since initialization or reset.

```html
<input class="form-control ng-untouched ng-pristine ng-valid" />;
<input class="form-control ng-untouched ng-pristine ng-valid" />
```

1. Take the following actions on the **Name** `<input>` box, and observe which classes appear.
Expand Down
6 changes: 3 additions & 3 deletions adev/src/content/guide/http/http-resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ userId = input.required<string>();
user = httpResource(() => `/api/user/${userId()}`); // A reactive function as argument
```

`httpResource` is reactive, meaning that whenever one of the signal it depends on changes (like `userId`), the resource will emit a new http request.
`httpResource` is reactive, meaning that whenever one of the signals it depends on changes (like `userId`), the resource will emit a new http request.
If a request is already pending, the resource cancels the outstanding request before issuing a new one.

HELPFUL: `httpResource` differs from the `HttpClient` as it initiates the request _eagerly_. In contrast, the `HttpClient` only initiates requests upon subscription to the returned `Observable`.
Expand Down Expand Up @@ -54,7 +54,7 @@ The signals of the `httpResource` can be used in the template to control which e

```angular-html
@if(user.hasValue()) {
<user-details [user]="user.value()">
<user-details [user]="user.value()" />
} @else if (user.error()) {
<div>Could not load user information</div>
} @else if (user.isLoading()) {
Expand All @@ -66,7 +66,7 @@ HELPFUL: Reading the `value` signal on a `resource` that is in error state throw

### Response types

By default, `httpResource` returns and parses the response as JSON. However, you can specify alternate return with additional functions on `httpResource`:
By default, `httpResource` returns and parses the response as JSON. However, you can specify an alternate return type with additional functions on `httpResource`:

```ts
httpResource.text(() => ({ … })); // returns a string in value()
Expand Down
2 changes: 1 addition & 1 deletion adev/src/content/guide/http/interceptors.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can use interceptors to implement a variety of common patterns, such as:
- Customizing the parsing of responses.
- Measuring server response times and logging them.
- Driving UI elements such as a loading spinner while network operations are in progress.
- Collecting and batch requests made within a certain timeframe.
- Collecting and batching requests made within a certain timeframe.
- Automatically failing requests after a configurable deadline or timeout.
- Regularly polling the server and refreshing results.

Expand Down
6 changes: 3 additions & 3 deletions adev/src/content/guide/http/making-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Sometimes transient errors such as network interruptions can cause a request to

### Timeouts

To set a timeout for a request, you can set the `timeout` option to a number of milliseconds along other request options. If the backend request does not complete within the specified time, the request will be aborted and an error will be emitted.
To set a timeout for a request, you can set the `timeout` option to a number of milliseconds along with other request options. If the backend request does not complete within the specified time, the request will be aborted and an error will be emitted.

NOTE: The timeout will only apply to the backend HTTP request itself. It is not a timeout for the entire request handling chain. Therefore, this option is not affected by any delay introduced by interceptors.

Expand Down Expand Up @@ -563,7 +563,7 @@ TIP: Use `referrer: ''` for sensitive requests where you don't want to leak the

#### Referrer policy

The `referrerPolicy` option controls how much referrer information , the URL of the page making the request is sent along with an HTTP request. This setting affects both privacy and analytics, allowing you to balance data visibility with security considerations.
The `referrerPolicy` option controls how much referrer informationthe URL of the page making the requestis sent along with an HTTP request. This setting affects both privacy and analytics, allowing you to balance data visibility with security considerations.

```ts
// Send no referrer information regardless of the current page
Expand All @@ -590,7 +590,7 @@ The `referrerPolicy` option accepts:
- `'same-origin'` Sends the full URL for same-origin requests and no referrer for cross-origin requests.
- `'strict-origin'` Sends only the origin, and only if the protocol security level is not downgraded (e.g., HTTPS→HTTPS). Omits the referrer on downgrade.
- `'strict-origin-when-cross-origin'` Default browser behavior. Sends the full URL for same-origin requests, the origin for cross-origin requests when not downgraded, and omits the referrer on downgrade.
- `'unsafe-url'`Always sends the full URL (including path and query). This can expose sensitive data and should be used with caution.
- `'unsafe-url'` Always sends the full URL (including path and query). This can expose sensitive data and should be used with caution.

TIP: Prefer conservative values such as `'no-referrer'`, `'origin'`, or `'strict-origin-when-cross-origin'` for privacy-sensitive requests.

Expand Down
2 changes: 1 addition & 1 deletion adev/src/content/guide/signals/debounced.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class Search {

## Status during debounce

While the debounce timer is counting down, `status()` is `'loading'` and `value()` returns the previously resolved value. When the timer expires, the resource settles to `'resolved'`. If the source signal throws, the resource enters `'error'` immediately no timer runs.
While the debounce timer is counting down, `status()` is `'loading'` and `value()` returns the previously resolved value. When the timer expires, the resource settles to `'resolved'`. If the source signal throws, the resource enters `'error'` immediately; no timer runs.

See [Resource status](/guide/signals/resource#resource-status) for the full list of statuses and their `value()` behavior.

Expand Down
2 changes: 1 addition & 1 deletion adev/src/content/guide/signals/effect.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Effects should be the last API you reach for. Always prefer `computed()` for der
TIP: There are no situations where effect is good, only situations where it is appropriate.

- Logging signal values, either for analytics or as a debugging tool.
- Keeping data in sync with different kind of storages: `window.localStorage`, session storage, cookies etc.
- Keeping data in sync with different kinds of storage: `window.localStorage`, session storage, cookies, etc.
- Adding custom DOM behavior that can't be expressed with template syntax.
- Performing custom rendering to a `<canvas>` element, charting library, or other third party UI library.

Expand Down
2 changes: 1 addition & 1 deletion adev/src/content/guide/signals/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Writable signals have the type `WritableSignal`.

#### Converting writable signals to readonly

`WritableSignal` provide a `asReadonly()` method that returns a readonly version of the signal. This is useful when you want to expose a signal's value to consumers without allowing them to modify it directly:
`WritableSignal` provides an `asReadonly()` method that returns a readonly version of the signal. This is useful when you want to expose a signal's value to consumers without allowing them to modify it directly:

```ts
@Service()
Expand Down
2 changes: 1 addition & 1 deletion adev/src/content/guide/templates/control-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ The value of the conditional expression is compared to the case expression using

**`@switch` does not have a fallthrough**, so you do not need an equivalent to a `break` or `return` statement in the block.

You can specify multiple conditions for a single block by have consecutive `@case` statements.
You can specify multiple conditions for a single block by having consecutive `@case` statements.

You can optionally include a `@default` block. The content of the `@default` block displays if none of the preceding case expressions match the switch value.

Expand Down
2 changes: 1 addition & 1 deletion adev/src/content/guide/templates/expression-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@ Generally speaking, declarations are not supported in Angular expressions. This

Event handlers are **statements** rather than expressions. While they support all of the same syntax as Angular expressions, there are two key differences:

1. Statements **do support** assignment operators (but not destructing assignments)
1. Statements **do support** assignment operators (but not destructuring assignments)
1. Statements **do not support** pipes
Loading