mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
parent
82bd547d23
commit
1fa59425db
7 changed files with 12 additions and 9 deletions
|
|
@ -122,6 +122,10 @@ const FOOTER_ROUTES: Route[] = mapNavigationItemsToRoutes(
|
|||
const API_REFERENCE_ROUTES: Route[] = mapApiManifestToRoutes();
|
||||
|
||||
const REDIRECT_ROUTES: Route[] = [
|
||||
{
|
||||
path: 'guide/pipes/**',
|
||||
redirectTo: 'guide/templates/pipes',
|
||||
},
|
||||
{
|
||||
path: 'guide/templates/attribute-binding',
|
||||
redirectTo: 'guide/templates/binding#binding-dynamic-properties-and-attributes',
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ copy_to_directory(
|
|||
"//adev/src/content/guide/i18n",
|
||||
"//adev/src/content/guide/ngmodules",
|
||||
"//adev/src/content/guide/performance",
|
||||
"//adev/src/content/guide/pipes",
|
||||
"//adev/src/content/guide/routing",
|
||||
"//adev/src/content/guide/signals",
|
||||
"//adev/src/content/guide/templates",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Format data based on locale
|
||||
|
||||
Angular provides the following built-in data transformation [pipes](guide/pipes).
|
||||
Angular provides the following built-in data transformation [pipes](guide/templates/pipes).
|
||||
The data transformation pipes use the [`LOCALE_ID`][ApiCoreLocaleId] token to format data based on rules of each locale.
|
||||
|
||||
| Data transformation pipe | Details |
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ The module's `declarations` array tells Angular which components belong to that
|
|||
As you create more components, add them to `declarations`.
|
||||
|
||||
The `declarations` array only takes declarables.
|
||||
Declarables are [components](guide/components), [directives](guide/directives), and [pipes](guide/pipes).
|
||||
Declarables are [components](guide/components), [directives](guide/directives), and [pipes](guide/templates/pipes).
|
||||
All of a module's declarables must be in the `declarations` array.
|
||||
Declarables must belong to exactly one module.
|
||||
The compiler returns an error if declare the same class in multiple modules.
|
||||
|
|
@ -103,7 +103,7 @@ And in the same file, add it to the `@NgModule` `declarations` array:
|
|||
Now you can use `ItemDirective` in a component.
|
||||
This example uses `AppModule`, but you would follow the same steps for a feature module.
|
||||
For more about directives, see [Attribute Directives](guide/directives/attribute-directives) and [Structural Directives](guide/directives/structural-directives).
|
||||
You'd also use the same technique for [pipes](guide/pipes) and [components](guide/components).
|
||||
You'd also use the same technique for [pipes](guide/templates/pipes) and [components](guide/components).
|
||||
|
||||
Remember, components, directives, and pipes belong to one module only.
|
||||
You only need to declare them once in your application because you share them by importing the necessary modules.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Testing Pipes
|
||||
|
||||
You can test [pipes](guide/pipes) without the Angular testing utilities.
|
||||
You can test [pipes](guide/templates/pipes) without the Angular testing utilities.
|
||||
|
||||
## Testing the `TitleCasePipe`
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Angular can't find a pipe with this name.
|
||||
|
||||
The [pipe](guide/pipes) referenced in the template has not been named or declared properly.
|
||||
The [pipe](guide/templates/pipes) referenced in the template has not been named or declared properly.
|
||||
|
||||
To use the pipe:
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ template: `
|
|||
`
|
||||
</docs-code>
|
||||
|
||||
For extra fun, try some different parameters for `date`. More information can be found in the [Angular docs](guide/pipes).
|
||||
For extra fun, try some different parameters for `date`. More information can be found in the [Angular docs](guide/templates/pipes).
|
||||
|
||||
</docs-step>
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ template: `
|
|||
`
|
||||
</docs-code>
|
||||
|
||||
You can also try different parameters for `currency`. More information can be found in the [Angular docs](guide/pipes).
|
||||
You can also try different parameters for `currency`. More information can be found in the [Angular docs](guide/templates/pipes).
|
||||
|
||||
</docs-step>
|
||||
|
||||
|
|
@ -67,6 +67,6 @@ You can also try different parameters for `currency`. More information can be fo
|
|||
|
||||
Great work with pipes. You've made some great progress so far.
|
||||
|
||||
There are even more built-in pipes that you can use in your applications. You can find the list in the [Angular documentation](guide/pipes).
|
||||
There are even more built-in pipes that you can use in your applications. You can find the list in the [Angular documentation](guide/templates/pipes).
|
||||
|
||||
In the case that the built-in pipes don't cover your needs, you can also create a custom pipe. Check out the next lesson to find out more.
|
||||
|
|
|
|||
Loading…
Reference in a new issue