From 87bb09bb1b05a3435b7b315809f56b515bd134cf Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Thu, 6 Oct 2022 17:45:48 -0300 Subject: [PATCH 01/26] docs(docs-infra): traducir `guide/property-binding.md`(#126) --- aio/content/guide/property-binding.en.md | 228 +++++++++++++++++++++++ aio/content/guide/property-binding.md | 25 ++- 2 files changed, 240 insertions(+), 13 deletions(-) create mode 100644 aio/content/guide/property-binding.en.md diff --git a/aio/content/guide/property-binding.en.md b/aio/content/guide/property-binding.en.md new file mode 100644 index 0000000000000..673be0e3dcf9d --- /dev/null +++ b/aio/content/guide/property-binding.en.md @@ -0,0 +1,228 @@ + +# Property binding `[property]` + +Use property binding to _set_ properties of target elements or +directive `@Input()` decorators. + +
+ +See the for a working example containing the code snippets in this guide. + +
+ +## One-way in + +Property binding flows a value in one direction, +from a component's property into a target element property. + +You can't use property +binding to read or pull values out of target elements. Similarly, you cannot use +property binding to call a method on the target element. +If the element raises events, you can listen to them with an [event binding](guide/event-binding). + +If you must read a target element property or call one of its methods, +see the API reference for [ViewChild](api/core/ViewChild) and +[ContentChild](api/core/ContentChild). + +## Examples + +The most common property binding sets an element property to a component +property value. An example is +binding the `src` property of an image element to a component's `itemImageUrl` property: + + + +Here's an example of binding to the `colSpan` property. Notice that it's not `colspan`, +which is the attribute, spelled with a lowercase `s`. + + + +For more details, see the [MDN HTMLTableCellElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCellElement) documentation. + +For more information about `colSpan` and `colspan`, see the [Attribute binding](guide/attribute-binding#colspan) guide. + +Another example is disabling a button when the component says that it `isUnchanged`: + + + +Another is setting a property of a directive: + + + +Yet another is setting the model property of a custom component—a great way +for parent and child components to communicate: + + + +## Binding targets + +An element property between enclosing square brackets identifies the target property. +The target property in the following code is the image element's `src` property. + + + +There's also the `bind-` prefix alternative: + + + + +In most cases, the target name is the name of a property, even +when it appears to be the name of an attribute. +So in this case, `src` is the name of the `` element property. + +Element properties may be the more common targets, +but Angular looks first to see if the name is a property of a known directive, +as it is in the following example: + + + +Technically, Angular is matching the name to a directive `@Input()`, +one of the property names listed in the directive's `inputs` array +or a property decorated with `@Input()`. +Such inputs map to the directive's own properties. + +If the name fails to match a property of a known directive or element, Angular reports an “unknown directive” error. + +
+ +Though the target name is usually the name of a property, +there is an automatic attribute-to-property mapping in Angular for +several common attributes. These include `class`/`className`, `innerHtml`/`innerHTML`, and +`tabindex`/`tabIndex`. + +
+ + +## Avoid side effects + +Evaluation of a template expression should have no visible side effects. +The expression language itself, or the way you write template expressions, +helps to a certain extent; +you can't assign a value to anything in a property binding expression +nor use the increment and decrement operators. + +For example, you could have an expression that invoked a property or method that had +side effects. The expression could call something like `getFoo()` where only you +know what `getFoo()` does. If `getFoo()` changes something +and you happen to be binding to that something, +Angular may or may not display the changed value. Angular may detect the +change and throw a warning error. +As a best practice, stick to properties and to methods that return +values and avoid side effects. + +## Return the proper type + +The template expression should evaluate to the type of value +that the target property expects. +Return a string if the target property expects a string, a number if it +expects a number, an object if it expects an object, and so on. + +In the following example, the `childItem` property of the `ItemDetailComponent` expects a string, which is exactly what you're sending in the property binding: + + + +You can confirm this by looking in the `ItemDetailComponent` where the `@Input` type is set to a string: + + +As you can see here, the `parentItem` in `AppComponent` is a string, which the `ItemDetailComponent` expects: + + +### Passing in an object + +The previous simple example showed passing in a string. To pass in an object, +the syntax and thinking are the same. + +In this scenario, `ItemListComponent` is nested within `AppComponent` and the `items` property expects an array of objects. + + + +The `items` property is declared in the `ItemListComponent` with a type of `Item` and decorated with `@Input()`: + + + +In this sample app, an `Item` is an object that has two properties; an `id` and a `name`. + + + +While a list of items exists in another file, `mock-items.ts`, you can +specify a different item in `app.component.ts` so that the new item will render: + + + +You just have to make sure, in this case, that you're supplying an array of objects because that's the type of `Item` and is what the nested component, `ItemListComponent`, expects. + +In this example, `AppComponent` specifies a different `item` object +(`currentItems`) and passes it to the nested `ItemListComponent`. `ItemListComponent` was able to use `currentItems` because it matches what an `Item` object is according to `item.ts`. The `item.ts` file is where +`ItemListComponent` gets its definition of an `item`. + +## Remember the brackets + +The brackets, `[]`, tell Angular to evaluate the template expression. +If you omit the brackets, Angular treats the string as a constant +and *initializes the target property* with that string: + + + + +Omitting the brackets will render the string +`parentItem`, not the value of `parentItem`. + +## One-time string initialization + +You *should* omit the brackets when all of the following are true: + +* The target property accepts a string value. +* The string is a fixed value that you can put directly into the template. +* This initial value never changes. + +You routinely initialize attributes this way in standard HTML, and it works +just as well for directive and component property initialization. +The following example initializes the `prefix` property of the `StringInitComponent` to a fixed string, +not a template expression. Angular sets it and forgets about it. + + + +The `[item]` binding, on the other hand, remains a live binding to the component's `currentItems` property. + +## Property binding vs. interpolation + +You often have a choice between interpolation and property binding. +The following binding pairs do the same thing: + + + +Interpolation is a convenient alternative to property binding in +many cases. When rendering data values as strings, there is no +technical reason to prefer one form to the other, though readability +tends to favor interpolation. However, *when setting an element +property to a non-string data value, you must use property binding*. + +## Content security + +Imagine the following malicious content. + + + +In the component template, the content might be used with interpolation: + + + +Fortunately, Angular data binding is on alert for dangerous HTML. In the above case, +the HTML displays as is, and the Javascript does not execute. Angular **does not** +allow HTML with script tags to leak into the browser, neither with interpolation +nor property binding. + +In the following example, however, Angular [sanitizes](guide/security#sanitization-and-security-contexts) +the values before displaying them. + + + +Interpolation handles the ` Syntax" is the interpolated evil title. +"Template alert("evil never sleeps")Syntax" is the property bound evil title. + diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 673be0e3dcf9d..7857cad75a914 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -1,27 +1,26 @@ -# Property binding `[property]` +# Enlace de propiedades `[propiedad]` -Use property binding to _set_ properties of target elements or -directive `@Input()` decorators. +Puedes usar los enlaces de propiedad para _asignar valores_ a datos dentro de elementos (_propiedades_) que posean decoradores de directiva `@Input()`.
-See the for a working example containing the code snippets in this guide. +Echa un vistazo al , un ejemplo en acción usando los bloques de código de esta guía.
-## One-way in +## Enlace de una sola vía (One-way binding) -Property binding flows a value in one direction, -from a component's property into a target element property. +Este tipo de enlace permite que un dato fluya en una única dirección, +desde una propiedad origen de un componente hacia la propiedad destino de un elemento. -You can't use property -binding to read or pull values out of target elements. Similarly, you cannot use -property binding to call a method on the target element. -If the element raises events, you can listen to them with an [event binding](guide/event-binding). +No puedes usar enlaces de propiedad +para leer ni recibir valores desde elemento destino. Asimismo, tampoco puedes utilizar +enlaces de propiedad para llamar a métodos del elemento destino. +Si el elemento en cuestión dispara eventos, puedes instalar un escucha utilizando [enlaces de eventos](guide/event-binding). -If you must read a target element property or call one of its methods, -see the API reference for [ViewChild](api/core/ViewChild) and +Si necesitas leer la propiedad de un elemento destino o llamar a alguno de sus métodos, +echa un vistazo a la referencia de la API para los decoradores [ViewChild](api/core/ViewChild) y [ContentChild](api/core/ContentChild). ## Examples From 892d5d528cf7b7229816940dc83d8861b523fee8 Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Thu, 6 Oct 2022 18:25:48 -0300 Subject: [PATCH 02/26] docs(docs-infra): traducir `guide/property-binding.md`(#126) --- aio/content/guide/property-binding.md | 95 +++++++++++++-------------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 7857cad75a914..a855dd2fa0827 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -23,91 +23,90 @@ Si necesitas leer la propiedad de un elemento destino o llamar a alguno de sus m echa un vistazo a la referencia de la API para los decoradores [ViewChild](api/core/ViewChild) y [ContentChild](api/core/ContentChild). -## Examples +## Ejemplos -The most common property binding sets an element property to a component -property value. An example is -binding the `src` property of an image element to a component's `itemImageUrl` property: +El enlace de propiedad más común establece la propiedad de un elemento +como valor de propiedad de un componente. Un ejemplo es +enlazar la propiedad `src` de un elemento de imagen desde la propiedad `itemImageUrl` (_urlDeImagen_) de un componente: -Here's an example of binding to the `colSpan` property. Notice that it's not `colspan`, -which is the attribute, spelled with a lowercase `s`. +En otro ejemplo, enlazamos la propiedad `colSpan`. Ten cuidado de no confundirla con `colspan`, +la que es el atributo HTML escrito con una `s` minúscula. -For more details, see the [MDN HTMLTableCellElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCellElement) documentation. +Para más detalles, revisa la documentación de [HTMLTableCellElement en MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCellElement). -For more information about `colSpan` and `colspan`, see the [Attribute binding](guide/attribute-binding#colspan) guide. +Para más información sobre este ejemplo de enlace con `colSpan` y `colspan`, echa un vistazo a la guía de [Enlaces de atributo](guide/attribute-binding#colspan). -Another example is disabling a button when the component says that it `isUnchanged`: +Otro ejemplo es desactivar un botón cuando el componente posee una propiedad `isUnchanged` (_noPoseeCambios_): -Another is setting a property of a directive: +Otro ejemplo, asignar un valor a la propiedad de una directiva: -Yet another is setting the model property of a custom component—a great way -for parent and child components to communicate: +Otro más es asignar un objeto como valor a la propiedad de un componente—la que es una excelente +manera de comunicar componentes padres con hijos: -## Binding targets +## Destinos de enlaces de propiedad -An element property between enclosing square brackets identifies the target property. -The target property in the following code is the image element's `src` property. +Una propiedad de elemento encerrada en corchetes (_square brackets_) se identifica +como propiedad de destino. +En el código a continuación, la propiedad destino es `src`, del elemento de imagen. -There's also the `bind-` prefix alternative: +También es posible usar la nomenclatura alternativa, añadiendo el prefijo `bind-`: +En la mayoría de los casos, el nombre del destino es de una propiedad, incluso +si parece ser el nombre de un atributo. +En este caso, `src` es el nombre de una propiedad del elemento ``. -In most cases, the target name is the name of a property, even -when it appears to be the name of an attribute. -So in this case, `src` is the name of the `` element property. - -Element properties may be the more common targets, -but Angular looks first to see if the name is a property of a known directive, -as it is in the following example: +Las propiedades de elemento pueden ser destinos comunes de enlace, +pero Angular siempre analiza antes si el nombre corresponde a la propiedad de una directiva conocida, +como en el caso del ejemplo que sigue: -Technically, Angular is matching the name to a directive `@Input()`, -one of the property names listed in the directive's `inputs` array -or a property decorated with `@Input()`. -Such inputs map to the directive's own properties. +Técnicamente, Angular está correspondiendo el nombre como si se tratara de una directiva `@Input()`, +o un nombre de propiedad incluido en el array `inputs` de la directiva, +o una propiedad decorada con `@Input()`. +En tales casos se realiza un mapeo hacia las propiedades de la directiva. -If the name fails to match a property of a known directive or element, Angular reports an “unknown directive” error. +Si el nombre no se corresponde con una propiedad de una directiva o elemento conocido, Angular reporta un error de “directiva desconocida” (_unknown directive_).
-Though the target name is usually the name of a property, -there is an automatic attribute-to-property mapping in Angular for -several common attributes. These include `class`/`className`, `innerHtml`/`innerHTML`, and +Aunque el nombre del destino usualmente es el nombre de una propiedad, +Angular posee un mapeo automático de attributo-a-propiedad para +varios atributos comunes. Entre ellos se incluyen `class`/`className`, `innerHtml`/`innerHTML`, y `tabindex`/`tabIndex`.
- -## Avoid side effects - -Evaluation of a template expression should have no visible side effects. -The expression language itself, or the way you write template expressions, -helps to a certain extent; -you can't assign a value to anything in a property binding expression -nor use the increment and decrement operators. - -For example, you could have an expression that invoked a property or method that had -side effects. The expression could call something like `getFoo()` where only you -know what `getFoo()` does. If `getFoo()` changes something -and you happen to be binding to that something, -Angular may or may not display the changed value. Angular may detect the -change and throw a warning error. -As a best practice, stick to properties and to methods that return -values and avoid side effects. +## Evitar efectos secundarios + +El evaluamiento de una expresión de plantilla no debería tener efectos secundarios visibles. +El propio lenguaje de expresión, o la manera en que escribes expresiones de plantilla, +favorece este aspecto hasta cierto punto; +no puedes simplemente asignar valores a cualquier cosa dentro de una expresión de enlace de propiedad +ni usar los operadores de incremento o reducción. + +Pero por ejempo, podrías tener una expresión que invocase una propiedad o método el cual tuviera +efectos secundarios. La expresión internamente podría llamar a un método `getFoo()` y sólo tú sabrías +lo que `getFoo()` hace. Si `getFoo()` cambia algo más +y estás enlazando algún dato a ese algo más, +Angular podría no mostrar el dato correcto. O Angular podría detectar el +cambio y levantar una advertencia o un error. +Como consejo y buena práctica, es mejor atenerse a enlazar propiedades y métodos que devuelvan +valores para evitar efectos secundarios. ## Return the proper type From cf5f5813ed244ee9f1aee3b9978a4cf498a85f82 Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Thu, 6 Oct 2022 22:43:01 -0300 Subject: [PATCH 03/26] docs(docs-infra): traducir `guide/property-binding.md`(#126) --- aio/content/guide/property-binding.md | 53 ++++++++++++++------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index a855dd2fa0827..b4a2cfd2756bb 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -108,62 +108,63 @@ cambio y levantar una advertencia o un error. Como consejo y buena práctica, es mejor atenerse a enlazar propiedades y métodos que devuelvan valores para evitar efectos secundarios. -## Return the proper type +## Devolver el valor adecuado -The template expression should evaluate to the type of value -that the target property expects. -Return a string if the target property expects a string, a number if it -expects a number, an object if it expects an object, and so on. +Toda expresión de plantilla debiese ser evaluada con el tipo de valor +que la propiedad destino espera. +Deberías devolver un string si la propiedad destino espera un string, o un número si ésta +espera un número, un objeto si lo que espera es un objeto, y así consecutivamente. -In the following example, the `childItem` property of the `ItemDetailComponent` expects a string, which is exactly what you're sending in the property binding: +En el siguiente ejemplo, la propiedad `childItem` (__itemHijo__) del `ItemDetailComponent` espera un string, exactamente lo mismo que verás que es enviado a través del enlace de propiedad: -You can confirm this by looking in the `ItemDetailComponent` where the `@Input` type is set to a string: +Al revisar el `ItemDetailComponent` se puede verificar que la propiedad con el decorador `@Input` ha sido declarada de tipo string: -As you can see here, the `parentItem` in `AppComponent` is a string, which the `ItemDetailComponent` expects: +Y como se aprecia aquí, el `parentItem` (__itemPadre__) del `AppComponent` es un string, justamente lo que `ItemDetailComponent` espera: -### Passing in an object +### Enlazar objetos -The previous simple example showed passing in a string. To pass in an object, -the syntax and thinking are the same. +El sencillo ejemplo anterior demostró el enlazado de un string. No obstante, para enlazar un objeto, +se usa el mismo fundamento y sintaxis. -In this scenario, `ItemListComponent` is nested within `AppComponent` and the `items` property expects an array of objects. +En el siguiente escenario, el `ItemListComponent` se anida dentro del `AppComponent` y la propiedad `items` espera recibir un array de objetos. -The `items` property is declared in the `ItemListComponent` with a type of `Item` and decorated with `@Input()`: +La propiedad `items` es declarada en el `ItemListComponent` como array de tipo `Item` y decorada con `@Input()`: -In this sample app, an `Item` is an object that has two properties; an `id` and a `name`. +En esta aplicación de muestra, un `Item` es un objeto con dos propiedades; `id` y `name`. -While a list of items exists in another file, `mock-items.ts`, you can -specify a different item in `app.component.ts` so that the new item will render: +Mientras una lista de items existe en otro archivo, `mock-items.ts`, puedes +indicar un item diferente en `app.component.ts` de forma que el nuevo item se renderizará: -You just have to make sure, in this case, that you're supplying an array of objects because that's the type of `Item` and is what the nested component, `ItemListComponent`, expects. +Sólo tienes que asegurarte, en este caso, de que provees un array de objectos pues ese es el tipo de `item` y lo que el componente anidado, `ItemListComponent`, espera. -In this example, `AppComponent` specifies a different `item` object -(`currentItems`) and passes it to the nested `ItemListComponent`. `ItemListComponent` was able to use `currentItems` because it matches what an `Item` object is according to `item.ts`. The `item.ts` file is where -`ItemListComponent` gets its definition of an `item`. +En este ejemplo, `AppComponent` declara un objeto `item` diferente +(`currentItems`) y lo enlaza al `ItemListComponent` anidado. `ItemListComponent` es capaz de recibir `currentItems` pues éste +corresponde a la definición de `Item` dada por `item.ts`. El archivo `item.ts` es aquél donde +`ItemListComponent` obtiene su definición de un `item`. -## Remember the brackets +## Recordar los corchetes -The brackets, `[]`, tell Angular to evaluate the template expression. -If you omit the brackets, Angular treats the string as a constant -and *initializes the target property* with that string: +Los corchetes (__square brackets__), `[]`, indican para Angular que debe evaluar la expresión de plantilla. +Si omites los corchetes, Angular trata al string como una constante +e *inicializa la propiedad de destino* con ese string: -Omitting the brackets will render the string -`parentItem`, not the value of `parentItem`. +Omitir los corchetes renderizará el texto +`parentItem`, no el valor de la propiedad `parentItem`. ## One-time string initialization From 6e75221f055a695736773e025aaf9293674e90e0 Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Thu, 6 Oct 2022 23:06:00 -0300 Subject: [PATCH 04/26] docs(docs-infra): traducir `guide/property-binding.md`(#126) --- aio/content/guide/property-binding.md | 62 +++++++++++++-------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index b4a2cfd2756bb..078f801bb6b27 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -166,60 +166,60 @@ e *inicializa la propiedad de destino* con ese string: Omitir los corchetes renderizará el texto `parentItem`, no el valor de la propiedad `parentItem`. -## One-time string initialization +## Inicialización aislada de string -You *should* omit the brackets when all of the following are true: +*Sí deberías* omitir los corchetes cuando todas las condiciones siguientes se cumplen: -* The target property accepts a string value. -* The string is a fixed value that you can put directly into the template. -* This initial value never changes. +* La propiedad destino acepta un valor de tipo string. +* El string es un valor fijo que puedes ingresar directamente en la plantilla. +* Este valor inicial nunca cambia. -You routinely initialize attributes this way in standard HTML, and it works -just as well for directive and component property initialization. -The following example initializes the `prefix` property of the `StringInitComponent` to a fixed string, -not a template expression. Angular sets it and forgets about it. +Esta es la manera en que inicializas atributos en la sintaxis estándar de HTML, y funciona +sin problemas para inicializar directivas y propiedades de componentes. +El ejemplo siguiente inicializa la propiedad `prefix` del `StringInitComponent` con un string fijo, +y no una expresión de plantilla. Angular le asigna el valor y se olvida de ella. -The `[item]` binding, on the other hand, remains a live binding to the component's `currentItems` property. +El enlace de `[item]`, en cambio, se mantiene unido a la propiedad `currentItems` del componente. -## Property binding vs. interpolation +## Enlace de propiedad vs. interpolación -You often have a choice between interpolation and property binding. -The following binding pairs do the same thing: +A menudo tienes la posibilidad de elegir entre realizar uniones de datos con interpolación o con enlace de propiedad. +Cada uno de los pares de unión siguientes tienen el mismo efecto: -Interpolation is a convenient alternative to property binding in -many cases. When rendering data values as strings, there is no -technical reason to prefer one form to the other, though readability -tends to favor interpolation. However, *when setting an element -property to a non-string data value, you must use property binding*. +La interpolación en muchos casos es una alternativa conveniente a la unión de propiedad. +Cuando se renderizan valores de datos como string, no existe motivo +técnico para preferir una opción sobre la otra, aunque la legibilidad +tiende a favorecer la interpolación. +Sin embargo, *debes usar el enlace de propiedad para asignar un valor que no sea string a la propiedad de un elemento*. -## Content security +## Seguridad del contenido -Imagine the following malicious content. +Supongamos que tenemos el siguiente contenido malicioso. -In the component template, the content might be used with interpolation: +En la plantilla del componente, este contenido podría ser interpolado: -Fortunately, Angular data binding is on alert for dangerous HTML. In the above case, -the HTML displays as is, and the Javascript does not execute. Angular **does not** -allow HTML with script tags to leak into the browser, neither with interpolation -nor property binding. +Afortunadamente, los enlaces de Angular están alertas ante la posibilidad de encontrar HTML peligroso. En el caso anterior, +el código HTML se muestra tal cual, y la porción Javascript no se ejecuta. Angular **no permite** +que se filtre código HTML con etiquetas script al navegador, ni por medio de interpolación +o enlaces de propiedad. -In the following example, however, Angular [sanitizes](guide/security#sanitization-and-security-contexts) -the values before displaying them. +En el ejemplo siguiente, sin embargo, Angular [sanitiza](guide/security#sanitization-and-security-contexts) +los values antes de mostrarlos. -Interpolation handles the ` Syntax" is the interpolated evil title. From e842c540a85a3a07f950d1df78adaa0516127a6b Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 17:49:36 -0300 Subject: [PATCH 05/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` usar terminologia apropiada Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 078f801bb6b27..f54793c7e89c6 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -5,7 +5,7 @@ Puedes usar los enlaces de propiedad para _asignar valores_ a datos dentro de el
-Echa un vistazo al , un ejemplo en acción usando los bloques de código de esta guía. +Echa un vistazo a , un ejemplo en acción usando los fragmentos de código de esta guía.
From b5093597c582e4fcef277310e216f0dcc9ba3f27 Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Mon, 31 Oct 2022 17:59:36 -0300 Subject: [PATCH 06/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] usar nombre de manera consistente --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index f54793c7e89c6..ac53e96686c29 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -1,5 +1,5 @@ -# Enlace de propiedades `[propiedad]` +# Enlace de propiedad `[propiedad]` Puedes usar los enlaces de propiedad para _asignar valores_ a datos dentro de elementos (_propiedades_) que posean decoradores de directiva `@Input()`. From 0511f6681cfa83d6768de17b179cd024c8e7ffbf Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Mon, 31 Oct 2022 18:01:03 -0300 Subject: [PATCH 07/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] corrige conjugacion de verbo gracias @alejandrocoding --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index ac53e96686c29..35212bb720ba5 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -1,7 +1,7 @@ # Enlace de propiedad `[propiedad]` -Puedes usar los enlaces de propiedad para _asignar valores_ a datos dentro de elementos (_propiedades_) que posean decoradores de directiva `@Input()`. +Usa los enlaces de propiedad para _asignar valores_ a datos dentro de elementos (_propiedades_) que posean decoradores de directiva `@Input()`.
From 14ecb9732fe870137b5ef5df4ec3454c97c95053 Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Mon, 31 Oct 2022 18:08:03 -0300 Subject: [PATCH 08/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] usa menos palabras gracias @alejandrocoding --- aio/content/guide/property-binding.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 35212bb720ba5..08962c6d7bc7c 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -1,7 +1,8 @@ # Enlace de propiedad `[propiedad]` -Usa los enlaces de propiedad para _asignar valores_ a datos dentro de elementos (_propiedades_) que posean decoradores de directiva `@Input()`. +Usa los enlaces de propiedad para asignar valores (_set_) a propiedades de elementos o +decoradores de directiva `@Input()`.
From 3ac90cd3b5bef7912c3666eafb9981bd1d772ed6 Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 18:16:16 -0300 Subject: [PATCH 09/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit usa sinónimo más apropiado para el concepto Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 08962c6d7bc7c..37adbb30932e3 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -10,7 +10,7 @@ Echa un vistazo a , un ejemplo en acción usando lo
-## Enlace de una sola vía (One-way binding) +## De una dirección (One-way) Este tipo de enlace permite que un dato fluya en una única dirección, desde una propiedad origen de un componente hacia la propiedad destino de un elemento. From ca05eb423a2ad99d07e8f1c9994a4fe904140790 Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 18:25:25 -0300 Subject: [PATCH 10/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit quita un artículo redundante y mejora la puntuación Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 37adbb30932e3..9d6c01a766078 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -33,7 +33,7 @@ enlazar la propiedad `src` de un elemento de imagen desde la propiedad `itemImag En otro ejemplo, enlazamos la propiedad `colSpan`. Ten cuidado de no confundirla con `colspan`, -la que es el atributo HTML escrito con una `s` minúscula. +que es el atributo HTML, escrito con una `s` minúscula. From 2324fc77cb5d7553787294d4433d971c58052b0a Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 18:26:14 -0300 Subject: [PATCH 11/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit quita un artículo redundante Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 9d6c01a766078..727689751a83a 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -49,7 +49,7 @@ Otro ejemplo, asignar un valor a la propiedad de una directiva: -Otro más es asignar un objeto como valor a la propiedad de un componente—la que es una excelente +Otro más es asignar un objeto como valor a la propiedad de un componente—que es una excelente manera de comunicar componentes padres con hijos: From c5e942ef67a8da665fed20e2cbdeba7a43ef3e56 Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 18:29:19 -0300 Subject: [PATCH 12/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit reordena el flujo de la oración; mejora la claridad del mensaje Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 727689751a83a..b9086a871ebfd 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -58,7 +58,7 @@ manera de comunicar componentes padres con hijos: Una propiedad de elemento encerrada en corchetes (_square brackets_) se identifica como propiedad de destino. -En el código a continuación, la propiedad destino es `src`, del elemento de imagen. +En el código a continuación, la propiedad destino del elemento de imagen es `src`. From 3f80f4e0ed5cc1d04b18234cdb9f48317a903c22 Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 18:33:44 -0300 Subject: [PATCH 13/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] usa un conector mas apropiado Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index b9086a871ebfd..8d54e96ac9df5 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -67,7 +67,7 @@ También es posible usar la nomenclatura alternativa, añadiendo el prefijo `bin En la mayoría de los casos, el nombre del destino es de una propiedad, incluso -si parece ser el nombre de un atributo. +cuando parece ser el nombre de un atributo. En este caso, `src` es el nombre de una propiedad del elemento ``. Las propiedades de elemento pueden ser destinos comunes de enlace, From daccec918777012e26785a25b21e118138553c5b Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 18:35:56 -0300 Subject: [PATCH 14/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] usa terminologia apropiada y simplifica la oracion Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 8d54e96ac9df5..6edfe46373cbb 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -76,7 +76,7 @@ como en el caso del ejemplo que sigue: -Técnicamente, Angular está correspondiendo el nombre como si se tratara de una directiva `@Input()`, +Técnicamente, Angular está enlazando el nombre a una directiva `@Input()`, o un nombre de propiedad incluido en el array `inputs` de la directiva, o una propiedad decorada con `@Input()`. En tales casos se realiza un mapeo hacia las propiedades de la directiva. From b5582a563a2c0cb85d3ee1b3d422be8fd4392571 Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 18:36:55 -0300 Subject: [PATCH 15/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] simplifica la expresion Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 6edfe46373cbb..b7540d28f8f58 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -85,7 +85,7 @@ Si el nombre no se corresponde con una propiedad de una directiva o elemento con
-Aunque el nombre del destino usualmente es el nombre de una propiedad, +Aunque el destino usualmente es el nombre de una propiedad, Angular posee un mapeo automático de attributo-a-propiedad para varios atributos comunes. Entre ellos se incluyen `class`/`className`, `innerHtml`/`innerHTML`, y `tabindex`/`tabIndex`. From 760b13178dd6e913e6f1acc3eacd5c0a24d643b3 Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 18:37:42 -0300 Subject: [PATCH 16/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] elimina un adjetivo innecesario Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index b7540d28f8f58..2219e6371b38e 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -97,7 +97,7 @@ varios atributos comunes. Entre ellos se incluyen `class`/`className`, `innerHtm El evaluamiento de una expresión de plantilla no debería tener efectos secundarios visibles. El propio lenguaje de expresión, o la manera en que escribes expresiones de plantilla, favorece este aspecto hasta cierto punto; -no puedes simplemente asignar valores a cualquier cosa dentro de una expresión de enlace de propiedad +no puedes asignar valores a cualquier cosa dentro de una expresión de enlace de propiedad ni usar los operadores de incremento o reducción. Pero por ejempo, podrías tener una expresión que invocase una propiedad o método el cual tuviera From 7630bc19e7146a1bbd911aee342023b304415340 Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 18:56:45 -0300 Subject: [PATCH 17/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 2219e6371b38e..3ed386cf45801 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -98,7 +98,7 @@ El evaluamiento de una expresión de plantilla no debería tener efectos secunda El propio lenguaje de expresión, o la manera en que escribes expresiones de plantilla, favorece este aspecto hasta cierto punto; no puedes asignar valores a cualquier cosa dentro de una expresión de enlace de propiedad -ni usar los operadores de incremento o reducción. +ni usar los operadores de incremento o decremento. Pero por ejempo, podrías tener una expresión que invocase una propiedad o método el cual tuviera efectos secundarios. La expresión internamente podría llamar a un método `getFoo()` y sólo tú sabrías From de04fbfca93cdda3238eb8c1df08821dd245530c Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 19:03:37 -0300 Subject: [PATCH 18/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] elimina adjetivos y preposiciones innecesarias Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 3ed386cf45801..86fd597688842 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -106,7 +106,7 @@ lo que `getFoo()` hace. Si `getFoo()` cambia algo más y estás enlazando algún dato a ese algo más, Angular podría no mostrar el dato correcto. O Angular podría detectar el cambio y levantar una advertencia o un error. -Como consejo y buena práctica, es mejor atenerse a enlazar propiedades y métodos que devuelvan +Como buena práctica, es mejor atenerse a enlazar propiedades y métodos que devuelvan valores para evitar efectos secundarios. ## Devolver el valor adecuado @@ -116,7 +116,7 @@ que la propiedad destino espera. Deberías devolver un string si la propiedad destino espera un string, o un número si ésta espera un número, un objeto si lo que espera es un objeto, y así consecutivamente. -En el siguiente ejemplo, la propiedad `childItem` (__itemHijo__) del `ItemDetailComponent` espera un string, exactamente lo mismo que verás que es enviado a través del enlace de propiedad: +En el siguiente ejemplo, la propiedad `childItem` (__itemHijo__) del `ItemDetailComponent` espera un string, exactamente lo mismo que es enviado a través del enlace de propiedad: @@ -152,7 +152,7 @@ Sólo tienes que asegurarte, en este caso, de que provees un array de objectos p En este ejemplo, `AppComponent` declara un objeto `item` diferente (`currentItems`) y lo enlaza al `ItemListComponent` anidado. `ItemListComponent` es capaz de recibir `currentItems` pues éste -corresponde a la definición de `Item` dada por `item.ts`. El archivo `item.ts` es aquél donde +corresponde a la definición de `Item` dada por `item.ts`. El archivo `item.ts` es donde `ItemListComponent` obtiene su definición de un `item`. ## Recordar los corchetes From 1524a15ca8e691ddd530ec1d80c49a0c97f0d1cf Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 19:05:34 -0300 Subject: [PATCH 19/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] corrige frases y palabras mal traducidas Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 86fd597688842..cca5e2229776d 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -105,15 +105,15 @@ efectos secundarios. La expresión internamente podría llamar a un método `get lo que `getFoo()` hace. Si `getFoo()` cambia algo más y estás enlazando algún dato a ese algo más, Angular podría no mostrar el dato correcto. O Angular podría detectar el -cambio y levantar una advertencia o un error. +cambio y lanzar una advertencia o un error. Como buena práctica, es mejor atenerse a enlazar propiedades y métodos que devuelvan valores para evitar efectos secundarios. -## Devolver el valor adecuado +## Devolver el tipo correcto -Toda expresión de plantilla debiese ser evaluada con el tipo de valor +Toda expresión de plantilla debe ser evaluada con el tipo de valor que la propiedad destino espera. -Deberías devolver un string si la propiedad destino espera un string, o un número si ésta +Devuelve un string si la propiedad destino espera un string, o un número si ésta espera un número, un objeto si lo que espera es un objeto, y así consecutivamente. En el siguiente ejemplo, la propiedad `childItem` (__itemHijo__) del `ItemDetailComponent` espera un string, exactamente lo mismo que es enviado a través del enlace de propiedad: @@ -126,7 +126,7 @@ Al revisar el `ItemDetailComponent` se puede verificar que la propiedad con el d Y como se aprecia aquí, el `parentItem` (__itemPadre__) del `AppComponent` es un string, justamente lo que `ItemDetailComponent` espera: -### Enlazar objetos +### Pasando objetos El sencillo ejemplo anterior demostró el enlazado de un string. No obstante, para enlazar un objeto, se usa el mismo fundamento y sintaxis. @@ -148,7 +148,7 @@ indicar un item diferente en `app.component.ts` de forma que el nuevo item se re -Sólo tienes que asegurarte, en este caso, de que provees un array de objectos pues ese es el tipo de `item` y lo que el componente anidado, `ItemListComponent`, espera. +Sólo tienes que asegurarte, en este caso, de que provees un array de objetos porque es el tipo de `item` y lo que el componente anidado, `ItemListComponent`, espera. En este ejemplo, `AppComponent` declara un objeto `item` diferente (`currentItems`) y lo enlaza al `ItemListComponent` anidado. `ItemListComponent` es capaz de recibir `currentItems` pues éste @@ -157,7 +157,7 @@ corresponde a la definición de `Item` dada por `item.ts`. El archivo `item.ts` ## Recordar los corchetes -Los corchetes (__square brackets__), `[]`, indican para Angular que debe evaluar la expresión de plantilla. +Los corchetes (__square brackets__), `[]`, indican a Angular que debe evaluar la expresión de plantilla. Si omites los corchetes, Angular trata al string como una constante e *inicializa la propiedad de destino* con ese string: @@ -187,7 +187,7 @@ El enlace de `[item]`, en cambio, se mantiene unido a la propiedad `currentItems ## Enlace de propiedad vs. interpolación A menudo tienes la posibilidad de elegir entre realizar uniones de datos con interpolación o con enlace de propiedad. -Cada uno de los pares de unión siguientes tienen el mismo efecto: +Los siguientes pares de enlaces tienen el mismo efecto: @@ -210,10 +210,10 @@ En la plantilla del componente, este contenido podría ser interpolado: Afortunadamente, los enlaces de Angular están alertas ante la posibilidad de encontrar HTML peligroso. En el caso anterior, el código HTML se muestra tal cual, y la porción Javascript no se ejecuta. Angular **no permite** que se filtre código HTML con etiquetas script al navegador, ni por medio de interpolación -o enlaces de propiedad. +ni de enlaces de propiedad. -En el ejemplo siguiente, sin embargo, Angular [sanitiza](guide/security#sanitization-and-security-contexts) -los values antes de mostrarlos. +En el ejemplo siguiente, sin embargo, Angular sanea (_sanitizes_)(guide/security#sanitization-and-security-contexts) +los valores antes de mostrarlos. From b5f88fee81c362375f6603d0aadcab1c2189b3cc Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 19:06:07 -0300 Subject: [PATCH 20/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] elimina adjetivo innecesario Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index cca5e2229776d..e9eeaa300fa87 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -128,7 +128,7 @@ Y como se aprecia aquí, el `parentItem` (__itemPadre__) del `AppComponent` es u ### Pasando objetos -El sencillo ejemplo anterior demostró el enlazado de un string. No obstante, para enlazar un objeto, +El ejemplo anterior demostró el enlazado de un string. No obstante, para enlazar un objeto, se usa el mismo fundamento y sintaxis. En el siguiente escenario, el `ItemListComponent` se anida dentro del `AppComponent` y la propiedad `items` espera recibir un array de objetos. From 819a8869ed16444de74a82518aa60956456b13f4 Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 19:07:09 -0300 Subject: [PATCH 21/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] simplifica y mejora la claridad de la oracion Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index e9eeaa300fa87..c84858406de04 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -219,8 +219,8 @@ los valores antes de mostrarlos. La interpolación maneja las etiquetas ` Syntax" is the interpolated evil title. From 0945c3226f6874a6037d0dd38dc680e93d4cf8a2 Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 19:07:30 -0300 Subject: [PATCH 22/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index c84858406de04..660c98298651f 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -177,7 +177,7 @@ Omitir los corchetes renderizará el texto Esta es la manera en que inicializas atributos en la sintaxis estándar de HTML, y funciona sin problemas para inicializar directivas y propiedades de componentes. -El ejemplo siguiente inicializa la propiedad `prefix` del `StringInitComponent` con un string fijo, +El siguiente ejemplo inicializa la propiedad `prefix` del `StringInitComponent` con un string fijo, y no una expresión de plantilla. Angular le asigna el valor y se olvida de ella. From 013574d4c75a6441e4294d05a12a227cb8008b64 Mon Sep 17 00:00:00 2001 From: Benjamin La Madrid Date: Mon, 31 Oct 2022 19:07:46 -0300 Subject: [PATCH 23/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 660c98298651f..b0468293a0d07 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -169,7 +169,7 @@ Omitir los corchetes renderizará el texto ## Inicialización aislada de string -*Sí deberías* omitir los corchetes cuando todas las condiciones siguientes se cumplen: +*Sí deberías* omitir los corchetes cuando se cumplan todas las siguientes condiciones: * La propiedad destino acepta un valor de tipo string. * El string es un valor fijo que puedes ingresar directamente en la plantilla. From ec44c338eaf6ef8ce276b095e3e896d8ffb43de7 Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Tue, 1 Nov 2022 10:08:48 -0300 Subject: [PATCH 24/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] usa sinonimo de verbo apropiado Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index b0468293a0d07..72e04352436cc 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -18,7 +18,7 @@ desde una propiedad origen de un componente hacia la propiedad destino de un ele No puedes usar enlaces de propiedad para leer ni recibir valores desde elemento destino. Asimismo, tampoco puedes utilizar enlaces de propiedad para llamar a métodos del elemento destino. -Si el elemento en cuestión dispara eventos, puedes instalar un escucha utilizando [enlaces de eventos](guide/event-binding). +Si el elemento en cuestión dispara eventos, puedes añadir un escucha utilizando [enlaces de eventos](guide/event-binding). Si necesitas leer la propiedad de un elemento destino o llamar a alguno de sus métodos, echa un vistazo a la referencia de la API para los decoradores [ViewChild](api/core/ViewChild) y From 00853d62c38e470814a52afbc1805d619155a863 Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Tue, 1 Nov 2022 10:09:05 -0300 Subject: [PATCH 25/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] usa sustantivo apropiado Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index 72e04352436cc..dfc46eb6bd94f 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -18,7 +18,7 @@ desde una propiedad origen de un componente hacia la propiedad destino de un ele No puedes usar enlaces de propiedad para leer ni recibir valores desde elemento destino. Asimismo, tampoco puedes utilizar enlaces de propiedad para llamar a métodos del elemento destino. -Si el elemento en cuestión dispara eventos, puedes añadir un escucha utilizando [enlaces de eventos](guide/event-binding). +Si el elemento en cuestión dispara eventos, puedes añadir un escuchador utilizando [enlaces de eventos](guide/event-binding). Si necesitas leer la propiedad de un elemento destino o llamar a alguno de sus métodos, echa un vistazo a la referencia de la API para los decoradores [ViewChild](api/core/ViewChild) y From dc6184dd0bf918096e28baa61a0690535fb849de Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Tue, 1 Nov 2022 10:10:27 -0300 Subject: [PATCH 26/26] docs(docs-infra): mejorar traduccion `guide/property-binding.md` [skip ci] mejora frase usando adjetivo cuantitativo Co-authored-by: Alejandro Lora --- aio/content/guide/property-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/property-binding.md b/aio/content/guide/property-binding.md index dfc46eb6bd94f..0aea9922d4c34 100644 --- a/aio/content/guide/property-binding.md +++ b/aio/content/guide/property-binding.md @@ -1,7 +1,7 @@ # Enlace de propiedad `[propiedad]` -Usa los enlaces de propiedad para asignar valores (_set_) a propiedades de elementos o +Usa los enlaces de propiedad para asignar valores (_set_) a propiedades de ciertos elementos o decoradores de directiva `@Input()`.