diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md deleted file mode 100644 index 39b3eb6862..0000000000 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -name: "\U0001F41EBug report" -about: Report a bug in the Angular Framework ---- - - - -# 馃悶 bug report - -### Affected Package - - The issue is caused by package @angular/.... - - -### Is this a regression? - - - Yes, the previous version in which this bug was not present was: .... - - -### Description - - A clear and concise description of the problem... - - -## 馃敩 Minimal Reproduction - - https://stackblitz.com/... - - - -## 馃敟 Exception or Error -

-
-
-
-
- - -## 馃實 Your Environment - -**Angular Version:** -

-
-
-
-
- -**Anything else relevant?** - - - diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md deleted file mode 100644 index 2a85f82375..0000000000 --- a/.github/ISSUE_TEMPLATE/2-feature-request.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: "\U0001F680Feature request" -about: Suggest a feature for Angular Framework - ---- - - - -# 馃殌 feature request - -### Relevant Package - - This feature request is for @angular/.... - - -### Description - A clear and concise description of the problem or missing capability... - - -### Describe the solution you'd like - If you have a solution in mind, please describe it. - - -### Describe alternatives you've considered - Have you considered any alternative solutions or workarounds? diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md deleted file mode 100644 index c7ed324cce..0000000000 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: "馃摎 Docs or angular.io issue report" -about: Report an issue in Angular's documentation or angular.io application - ---- - - -# 馃摎 Docs or angular.io bug report - -### Description - - A clear and concise description of the problem... - - -## 馃敩 Minimal Reproduction - -### What's the affected URL?** - https://angular.io/... - -### Reproduction Steps** - - - -### Expected vs Actual Behavior** - - - - -## 馃摲Screenshot - - - - -## 馃敟 Exception or Error -

-
-
-
-
- - -## 馃實 Your Environment - -### Browser info - - -### Anything else relevant? - diff --git a/.github/ISSUE_TEMPLATE/4-security-issue-disclosure.md b/.github/ISSUE_TEMPLATE/4-security-issue-disclosure.md deleted file mode 100644 index 70736318d2..0000000000 --- a/.github/ISSUE_TEMPLATE/4-security-issue-disclosure.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: 鈿狅笍 Security issue disclosure -about: Report a security issue in Angular Framework, Material, or CLI - ---- - -馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃 - -Please read https://angular.io/guide/security#report-issues on how to disclose security related issues. - -馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃 diff --git a/.github/ISSUE_TEMPLATE/5-support-request.md b/.github/ISSUE_TEMPLATE/5-support-request.md deleted file mode 100644 index 2dbeb30612..0000000000 --- a/.github/ISSUE_TEMPLATE/5-support-request.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: "鉂揝upport request" -about: Questions and requests for support - ---- - -馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃 - -Please do not file questions or support requests on the GitHub issues tracker. - -You can get your questions answered using other communication channels. Please see: -https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question - -Thank you! - -馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃 diff --git a/.github/ISSUE_TEMPLATE/6-angular-cli.md b/.github/ISSUE_TEMPLATE/6-angular-cli.md deleted file mode 100644 index 8bad6e69cd..0000000000 --- a/.github/ISSUE_TEMPLATE/6-angular-cli.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: "\U0001F6E0锔廇ngular CLI" -about: Issues and feature requests for Angular CLI - ---- - -馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃 - -Please file any Angular CLI issues at: https://github.com/angular/angular-cli/issues/new - -For the time being, we keep Angular CLI issues in a separate repository. - -馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃 diff --git a/.github/ISSUE_TEMPLATE/7-angular-components.md b/.github/ISSUE_TEMPLATE/7-angular-components.md deleted file mode 100644 index 181b418b55..0000000000 --- a/.github/ISSUE_TEMPLATE/7-angular-components.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: "\U0001F48EAngular Components" -about: Issues and feature requests for Angular Components - ---- - -馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃 - -Please file any Angular Components issues at: https://github.com/angular/components/issues/new - -For the time being, we keep Angular Components issues in a separate repository. - -馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃馃洃 diff --git a/.github/ISSUE_TEMPLATE/8-translate-docs.md b/.github/ISSUE_TEMPLATE/8-translate-docs.md new file mode 100644 index 0000000000..f724afcd91 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/8-translate-docs.md @@ -0,0 +1,22 @@ +--- +name: "馃摎Traducir doc al espa帽ol" +about: Solicitud para traducir ciertos docs al espa帽ol + +--- + +馃摎Traducir: creating-libraries.md + + + + +## Nombre del archivo: + creating-libraries.md + + +## Ruta donde se encuentra el archivo dentro del proyecto de Angular + + https://github.com/angular-hispano/angular/blob/master/aio/content/guide/creating-libraries.md \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ffec1591b6..4cccd14f4d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,43 +1,35 @@ -## PR Checklist -Please check if your PR fulfills the following requirements: +## Lista de Verificaci贸n del PR +Comprueba si tu PR cumple los siguientes requisitos: -- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit -- [ ] Tests for the changes have been added (for bug fixes / features) -- [ ] Docs have been added / updated (for bug fixes / features) +- [ ] El mensaje de commit conforme con [nuestras reglas](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit) +- [ ] Prueba los cambios que agregaste (arreglo de bugs / funcionalidades) +- [ ] Revisa tus traducciones o cambios de contenido +- [ ] Consult茅 el [diccionario de t茅rminos](https://github.com/angular-hispano/angular/issues/9) en espa帽ol +- [ ] Se han creado dos archivos con la extensi贸n correspondiente(.en.md para el archivo en ingl茅s y .md para el Archivo en espa帽ol) +- [ ] PR enlazada con el issue correspondiente -## PR Type -What kind of change does this PR introduce? +## Tipo de PR +驴Qu茅 tipo de cambio introduce este PR? - + - [ ] Bugfix -- [ ] Feature -- [ ] Code style update (formatting, local variables) -- [ ] Refactoring (no functional changes, no api changes) -- [ ] Build related changes -- [ ] CI related changes -- [ ] Documentation content changes -- [ ] angular.io application / infrastructure changes -- [ ] Other... Please describe: +- [ ] Funcionalidad +- [ ] Actualizar el estilo del c贸digo (formato, variables locales) +- [ ] Refactorizaci贸n (no cambios en la funcionalidad, no cambios en el api) +- [ ] Cambios relacionados al build +- [ ] Cambios relacionados al CI (Integraci贸n continua) +- [ ] Cambios en el contenido de la documentaci贸n +- [ ] Cambios en la aplicaci贸n / infrastructura de angular.io +- [ ] Otro... Por favor describela: + +## 驴Cu谩l es el comportamiento actual? + -## What is the current behavior? - - -Issue Number: N/A - - -## What is the new behavior? - - -## Does this PR introduce a breaking change? - -- [ ] Yes -- [ ] No - - - - - -## Other information +## 驴Cu谩l es el nuevo comportamiento? + diff --git a/README.md b/README.md index 846270ca04..81e9fa455d 100644 --- a/README.md +++ b/README.md @@ -5,22 +5,21 @@ # Angular -Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. +Angular es una plataforma de desarrollo para construir aplicaciones web y m贸viles que usa TypeScript/JavaScript y otros lenguajes de programaci贸n. -## Quickstart +## Gu铆a r谩pida -[Get started in 5 minutes][quickstart]. +[Comienza a usarlo en 5 minutos][quickstart]. -## Changelog +## Registro de cambios (Changelog) -[Learn about the latest improvements][changelog]. +[脷ltimas mejoras realizadas][changelog]. -## Want to help? +## 驴Quieres ayudar? -Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our -guidelines for [contributing][contributing] and then check out one of our issues in the [hotlist: community-help](https://github.com/angular/angular/labels/hotlist%3A%20community-help). +驴Quieres encontrar fallos, colaborar con c贸digo, o mejorar la documentaci贸n? 隆Excelente! Lee nuestras +pautas para [colaborar][contributing] y luego revisa algunos de nuestras incidencias (issues) en [ayuda comunitaria](https://github.com/angular-hispano/angular/labels/ayuda%20comunitaria). -[contributing]: https://github.com/angular/angular/blob/master/CONTRIBUTING.md -[quickstart]: https://angular.io/start +[contributing]: https://github.com/angular-hispano/angular/blob/master/CONTRIBUTING.md +[quickstart]: https://docs.angular.lat/start [changelog]: https://github.com/angular/angular/blob/master/CHANGELOG.md -[ng]: https://angular.io diff --git a/aio/content/guide/app-shell.md b/aio/content/guide/app-shell.md index 8804980873..b1c9bcf8f4 100644 --- a/aio/content/guide/app-shell.md +++ b/aio/content/guide/app-shell.md @@ -1,32 +1,32 @@ # App shell -App shell is a way to render a portion of your application via a route at build time. -It can improve the user experience by quickly launching a static rendered page (a skeleton common to all pages) while the browser downloads the full client version and switches to it automatically after the code loads. +App shell es una manera de renderizar una porci贸n de tu aplicaci贸n a trav茅s de una ruta en tiempo de compilaci贸n (build time). +Puede mejorar la experiencia de usuario lanzando r谩pidamente una p谩gina est谩tica renderizada (un esqueleto com煤n a todas las p谩ginas) mientras el navegador descarga la versi贸n completa del cliente y la muestra autom谩ticamente al finalizar su carga. -This gives users a meaningful first paint of your application that appears quickly because the browser can simply render the HTML and CSS without the need to initialize any JavaScript. +Esto da a los usuarios una primera visualizaci贸n significativa de su aplicaci贸n que aparece r谩pidamente porque el navegador simplemente puede renderizar HTML y CSS sin la necesidad de inicializar JavaScript. -Learn more in [The App Shell Model](https://developers.google.com/web/fundamentals/architecture/app-shell). +Obt茅nga m谩s informaci贸n en [El modelo de aplicaci贸n Shell](https://developers.google.com/web/fundamentals/architecture/app-shell). -## Step 1: Prepare the application +## Paso 1: Prepara la aplicaci贸n -You can do this with the following CLI command: +Puedes hacer esto con el siguiente comando CLI: ng new my-app --routing -For an existing application, you have to manually add the `RouterModule` and defining a `` within your application. +Para una aplicaci贸n existente, debes agregar manualmente el `RouterModule` y definir un` `dentro de tu aplicaci贸n. -## Step 2: Create the app shell +## Paso 2: Crea el shell de la aplicaci贸n -Use the CLI to automatically create the app shell. +Usa la CLI para crear autom谩ticamente el shell de la aplicaci贸n. ng generate app-shell -* `client-project` takes the name of your client application. +* `client-project` toma el nombre de tu aplicaci贸n cliente. -After running this command you will notice that the `angular.json` configuration file has been updated to add two new targets, with a few other changes. +Despu茅s de ejecutar este comando, notar谩 que el archivo de configuraci贸n `angular.json` se ha actualizado para agregar dos nuevos targets, con algunos otros cambios. "server": { @@ -53,20 +53,18 @@ After running this command you will notice that the `angular.json` configuration } -## Step 3: Verify the app is built with the shell content +## Paso 3: Verifica que la aplicaci贸n est谩 construida con el contenido del shell -Use the CLI to build the `app-shell` target. +Usa la CLI para construir el `app-shell` target. ng run my-app:app-shell -Or to use the production configuration. +O usa la configuraci贸n de producci贸n. ng run my-app:app-shell:production -To verify the build output, open `dist/my-app/index.html`. Look for default text `app-shell works!` to show that the app shell route was rendered as part of the output. - - +Para verificar el resultado de la compilaci贸n, abre `dist/my-app/index.html`. Busca el texto por defecto `app-shell works!` para mostrar que la ruta del shell de la aplicaci贸n se ha renderizado como parte de la carpeta de distribuci贸n. diff --git a/aio/content/guide/cheatsheet.md b/aio/content/guide/cheatsheet.md index f3e55928d3..58935f2883 100644 --- a/aio/content/guide/cheatsheet.md +++ b/aio/content/guide/cheatsheet.md @@ -10,7 +10,7 @@ platformBrowserDynamic().bootstrapModule(AppModule); -

Bootstraps the app, using the root component from the specified NgModule.

+

Carga la app, usando el componente ra铆z del NgModule especificado.

@@ -24,370 +24,372 @@ @NgModule({ declarations: ..., imports: ...,
exports: ..., providers: ..., bootstrap: ...})
class MyModule {}
-

Defines a module that contains components, directives, pipes, and providers.

+

Define un m贸dulo que contiene componentes, directivas, pipes y proveedores.

declarations: [MyRedComponent, MyBlueComponent, MyDatePipe] -

List of components, directives, and pipes that belong to this module.

+

Lista de componentes, directivas y pipes que pertenecen a este m贸dulo.

imports: [BrowserModule, SomeOtherModule] -

List of modules to import into this module. Everything from the imported modules -is available to declarations of this module.

+

Lista de m贸dulos para importar en este m贸dulo. Todo, desde los m贸dulos importados, +est谩 disponible para las declaraciones (declarations) de este m贸dulo. exports: [MyRedComponent, MyDatePipe] -

List of components, directives, and pipes visible to modules that import this module.

+

Lista de componentes, directivas y pipes visibles a los m贸dulos que importan este m贸dulo.

providers: [MyService, { provide: ... }] -

List of dependency injection providers visible both to the contents of this module and to importers of this module.

+

Lista de proveedores de inyecci贸n de dependencias visibles tanto para los contenidos de este m贸dulo como para los importadores de este m贸dulo.

entryComponents: [SomeComponent, OtherComponent] -

List of components not referenced in any reachable template, for example dynamically created from code.

+

Lista de componentes no referenciados en cualquier plantilla accesible, por ejemplo, creada din谩micamente a partir de c贸digo.

bootstrap: [MyAppComponent] -

List of components to bootstrap when this module is bootstrapped.

+

Lista de componentes a empaquetar cuando este m贸dulo se inicia.

- + - - - - - - + + - - + - - - - - - -
Template syntaxSintaxis de plantilla
<input [value]="firstName">

Binds property value to the result of expression firstName.

+

Vincula la propiedad value al resultado de la expresi贸n firstName.

<div [attr.role]="myAriaRole">

Binds attribute role to the result of expression myAriaRole.

+

Vincula el atributo role al resultado de la expresi贸n myAriaRole.

<div [class.extra-sparkle]="isDelightful">

Binds the presence of the CSS class extra-sparkle on the element to the truthiness of the expression isDelightful.

+

Vincula la presencia de la clase CSS extra-sparkle sobre el elemento a la veracidad de la expresi贸n isDelightful.

<div [style.width.px]="mySize">

Binds style property width to the result of expression mySize in pixels. Units are optional.

+

Vincula la propiedad de estilo width al resultado de la expresi贸n mySize en p铆xeles. La unidad de medida es opcional.

<button (click)="readRainbow($event)">

Calls method readRainbow when a click event is triggered on this button element (or its children) and passes in the event object.

+

Llama al m茅todo readRainbow cuando se lanza un evento click en este elemento bot贸n (o sus hijos) y pasa por argumento el objeto evento.

<div title="Hello {{ponyName}}"><div title="Hola {{ponyName}}">

Vincula una propiedad a una cadena interpolada, por ejemplo, "Hola Seabiscuit". Equivalente a:

Binds a property to an interpolated string, for example, "Hello Seabiscuit". Equivalent to: -<div [title]="'Hello ' + ponyName">

+<div [title]="'Hola ' + ponyName">

<p>Hello {{ponyName}}</p>

Binds text content to an interpolated string, for example, "Hello Seabiscuit".

+
<p>Hola {{ponyName}}</p>

Vincula el contenido de texto a una cadena interpolada, por ejemplo, "Hola Seabiscuit".

<my-cmp [(title)]="name">

Sets up two-way data binding. Equivalent to: <my-cmp [title]="name" (titleChange)="name=$event">

+

Establece el two-way data binding. Equivalente a: <my-cmp [title]="name" (titleChange)="name=$event">

<video #movieplayer ...>
<button (click)="movieplayer.play()">
</video>

Creates a local variable movieplayer that provides access to the video element instance in data-binding and event-binding expressions in the current template.

+

Crea una variable local movieplayer que provee acceso a la instancia del elemento video en las expresiones de data-binding y event-binding de la actual plantilla.

<p *myUnless="myExpression">...</p>

The * symbol turns the current element into an embedded template. Equivalent to: +

El s铆mbolo * convierte el elemento actual en una plantilla incrustada. Equivalente a: <ng-template [myUnless]="myExpression"><p>...</p></ng-template>

<p>Card No.: {{cardNumber | myCardNumberFormatter}}</p>

Transforms the current value of expression cardNumber via the pipe called myCardNumberFormatter.

+

Transforma el valor actual de la expresi贸n cardNumber a trav茅s de la pipe myCardNumberFormatter.

<p>Employer: {{employer?.companyName}}</p>

The safe navigation operator (?) means that the employer field is optional and if undefined, the rest of the expression should be ignored.

+

El operador de navegaci贸n seguro (?) significa que el campo employer es opcional y que si es undefined, el resto de la expresi贸n deber铆a ser ignorado.

<svg:rect x="0" y="0" width="100" height="100"/>

An SVG snippet template needs an svg: prefix on its root element to disambiguate the SVG element from an HTML component.

+

Una plantilla de fragmento SVG necesita un prefijo svg: en su elemento ra铆z para distinguir el elemento SVG de un componente HTML.

<svg>
<rect x="0" y="0" width="100" height="100"/>
</svg>

An <svg> root element is detected as an SVG element automatically, without the prefix.

+

Un elemento ra铆z <svg> es detectado como un elemento SVG autom谩ticamente, sin el prefijo.

- + - - - - -
Built-in directivesDirectivas incorporadas

import { CommonModule } from '@angular/common';

<section *ngIf="showSection">

Removes or recreates a portion of the DOM tree based on the showSection expression.

+

Elimina o recrea una parte del 谩rbol DOM basado en la expresi贸n showSection.

<li *ngFor="let item of list">

Turns the li element and its contents into a template, and uses that to instantiate a view for each item in list.

+

Convierte el elemento li y su contenido en una plantilla, y lo utiliza para crear una vista por cada elemento de la lista.

<div [ngSwitch]="conditionExpression">
<ng-template [ngSwitchCase]="case1Exp">...</ng-template>
<ng-template ngSwitchCase="case2LiteralString">...</ng-template>
<ng-template ngSwitchDefault>...</ng-template>
</div>

Conditionally swaps the contents of the div by selecting one of the embedded templates based on the current value of conditionExpression.

+

Intercambia condicionalmente el contenido del div seleccionando una de las plantillas incrustadas en funci贸n del valor actual de conditionExpression.

<div [ngClass]="{'active': isActive, 'disabled': isDisabled}">

Binds the presence of CSS classes on the element to the truthiness of the associated map values. The right-hand expression should return {class-name: true/false} map.

+

Vincula la presencia de clases CSS en el elemento a la veracidad de los valores de mapa asociados. La expresi贸n de la derecha deber铆a devolver el mapa {class-name: true/false}.

<div [ngStyle]="{'property': 'value'}">
<div [ngStyle]="dynamicStyles()">

Allows you to assign styles to an HTML element using CSS. You can use CSS directly, as in the first example, or you can call a method from the component.

+

Te permite asignar estilos a un elemento HTML usando CSS. Puedes usar CSS directamente, como en el primer ejemplo, o puedes llamar a un m茅todo desde el componente.

- + -
FormsFormularios

import { FormsModule } from '@angular/forms';

<input [(ngModel)]="userName">

Provides two-way data-binding, parsing, and validation for form controls.

+

Provee two-way data-binding, conversi贸n y validaci贸n para controles de formulario.

- + - - - -
Class decoratorsDecoradores de clases

import { Directive, ... } from '@angular/core';

@Component({...})
class MyComponent() {}

Declares that a class is a component and provides metadata about the component.

+

Declara que una clase es un componente y proporciona metadatos sobre el componente.

@Directive({...})
class MyDirective() {}

Declares that a class is a directive and provides metadata about the directive.

+

Declara que una clase es una directiva y proporciona metadatos sobre la directiva.

@Pipe({...})
class MyPipe() {}

Declares that a class is a pipe and provides metadata about the pipe.

+

Declara que una clase es una pipe y proporciona metadatos sobre la pipe.

@Injectable()
class MyService() {}

Declares that a class can be provided and injected by other classes. Without this decorator, the compiler won't generate enough metadata to allow the class to be created properly when it's injected somewhere.

+

Declara que una clase puede ser proporcionada e inyectada por otras clases. Sin este decorador, el compilador no generar谩 suficientes metadatos para permitir que la clase se cree correctamente cuando se inyecta en alguna parte.

- + - -
Directive configurationConfiguraci贸n de Directiva

@Directive({ property1: value1, ... })

selector: '.cool-button:not(a)'

Specifies a CSS selector that identifies this directive within a template. Supported selectors include element, +

Especifica un selector CSS que identifica esta directiva dentro de una plantilla. Los selectores compatibles incluyen element, [attribute], .class, and :not().

-

Does not support parent-child relationship selectors.

+

No soporta selectores de relaci贸n padre-hijo.

providers: [MyService, { provide: ... }]

List of dependency injection providers for this directive and its children.

+

Lista de proveedores de inyecci贸n de dependencia para esta directiva y sus hijos.

- + - - - - + -
Component configurationConfiguraci贸n de Componente

-@Component extends @Directive, -so the @Directive configuration applies to components as well

+@Component extiende @Directive, +entonces la configuraci贸n de @Directive se aplica tambi茅n a los componentes

moduleId: module.id

If set, the templateUrl and styleUrl are resolved relative to the component.

+

Si est谩 presente, el templateUrl y styleUrl se resuelven en relaci贸n con el componente.

viewProviders: [MyService, { provide: ... }]

List of dependency injection providers scoped to this component's view.

+

Lista de proveedores de inyecci贸n de dependencias en la vista de este componente.

template: 'Hello {{name}}'
templateUrl: 'my-component.html'

Inline template or external template URL of the component's view.

+
template: 'Hola {{name}}'
templateUrl: 'my-component.html'

Plantilla en l铆nea o URL de plantilla externa de la vista del componente.

styles: ['.primary {color: red}']
styleUrls: ['my-component.css']

List of inline CSS styles or external stylesheet URLs for styling the component鈥檚 view.

+

Lista de estilos CSS en l铆nea o URL de hojas de estilo externas para estilar la vista del componente.

- + - - - - - - - -
Class field decorators for directives and componentsDecoradores para los campos de la clase para directivas y componentes.

import { Input, ... } from '@angular/core';

@Input() myProperty;

Declares an input property that you can update via property binding (example: +

Declara una propiedad de entrada (input) que puede actualizar mediante el enlace de propiedad (property binding) (ejemplo: <my-cmp [myProperty]="someExpression">).

@Output() myEvent = new EventEmitter();

Declares an output property that fires events that you can subscribe to with an event binding (example: <my-cmp (myEvent)="doSomething()">).

+

Declara una propiedad de salida (output) que dispara eventos a los que puedes suscribirse con un enlace de evento (event binding) (ejemplo: <my-cmp (myEvent)="doSomething()">).

@HostBinding('class.valid') isValid;

Binds a host element property (here, the CSS class valid) to a directive/component property (isValid).

+

Vincula una propiedad del elemento anfitri贸n (aqu铆, la clase CSS valid) a una propiedad de directiva/componente (isValid).

@HostListener('click', ['$event']) onClick(e) {...}

Subscribes to a host element event (click) with a directive/component method (onClick), optionally passing an argument ($event).

+

Se suscribe a un evento del elemento anfitri贸n (click) con un m茅todo de directiva/componente (onClick), opcionalmente, pasando un argumento ($event).

@ContentChild(myPredicate) myChildComponent;

Binds the first result of the component content query (myPredicate) to a property (myChildComponent) of the class.

+

Vincula el primer resultado de la consulta de contenido del componente (myPredicate) a una propiedad (myChildComponent) de la clase.

@ContentChildren(myPredicate) myChildComponents;

Binds the results of the component content query (myPredicate) to a property (myChildComponents) of the class.

+

Vincula los resultados de la consulta de contenido del componente (myPredicate) a una propiedad (myChildComponents) de la clase.

@ViewChild(myPredicate) myChildComponent;

Binds the first result of the component view query (myPredicate) to a property (myChildComponent) of the class. Not available for directives.

+

Vincula el primer resultado de la consulta de vista del componente (myPredicate) a una propiedad (myChildComponent) de la clase. No disponible para directivas.

@ViewChildren(myPredicate) myChildComponents;

Binds the results of the component view query (myPredicate) to a property (myChildComponents) of the class. Not available for directives.

+

Vincula los resultados de la consulta de vista del componente (myPredicate) a una propiedad (myChildComponents) de la clase. No disponible para directivas.

- - + - - - - - - - - -
Directive and component change detection and lifecycle hooks

(implemented as class methods) + +

Detecci贸n de cambios (change detection) y ciclos de vida (lifecycle hooks) en directivas y componentes

(implementado como m茅todos de clase)

constructor(myService: MyService, ...) { ... }

Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.

+

Se llama antes que cualquier ciclo de vida. 脷selo para inyectar dependencias, pero evite cualquier trabajo serio aqu铆.

ngOnChanges(changeRecord) { ... }

Called after every change to input properties and before processing content or child views.

+

Se llama despu茅s de cada cambio en las propiedades de entrada (input) y antes de procesar contenido o vistas de hijos.

ngOnInit() { ... }

Called after the constructor, initializing input properties, and the first call to ngOnChanges.

+

Se llama despu茅s del constructor, inicializando propiedades de entrada (input), y la primera llamada a ngOnChanges.

ngDoCheck() { ... }

Called every time that the input properties of a component or a directive are checked. Use it to extend change detection by performing a custom check.

+

Se llama cada vez que se verifican las propiedades de entrada (input) de un componente o una directiva. 脷selo para extender la detecci贸n de cambios (change detection) realizando una verificaci贸n personalizada.

ngAfterContentInit() { ... }

Called after ngOnInit when the component's or directive's content has been initialized.

+

Se llama despu茅s de ngOnInit cuando el contenido del componente o directiva ha sido inicializado.

ngAfterContentChecked() { ... }

Called after every check of the component's or directive's content.

+

Se llama despu茅s de cada verificaci贸n del contenido del componente o directiva.

ngAfterViewInit() { ... }

Called after ngAfterContentInit when the component's views and child views / the view that a directive is in has been initialized.

+

Se llama despu茅s de ngAfterContentInit cuando las vistas del componente y las vistas hijas / la vista en la que se encuentra una directiva ha sido inicializado.

ngAfterViewChecked() { ... }

Called after every check of the component's views and child views / the view that a directive is in.

+

Se llama despu茅s de cada verificaci贸n de las vistas del componentes y las vistas hijas / la vista en la que se encuentra una directiva.

ngOnDestroy() { ... }

Called once, before the instance is destroyed.

+

Se llama una vez, antes de que la instancia se destruya.

- + - - -
Dependency injection configurationConfiguraci贸n de inyecci贸n de dependencia
{ provide: MyService, useClass: MyMockService }

Sets or overrides the provider for MyService to the MyMockService class.

+

Establece o sobre-escribe el proveedor para MyService en la clase MyMockService.

{ provide: MyService, useFactory: myFactory }

Sets or overrides the provider for MyService to the myFactory factory function.

+

Establece o sobre-escribe el proveedor para MyService en la factor铆a de funci贸n myFactory.

{ provide: MyValue, useValue: 41 }

Sets or overrides the provider for MyValue to the value 41.

+

Establece o sobre-escribe el proveedor para MyValue al valor 41.

- + - - - - - - - - -
Routing and navigationEnrutamiento y navegaci贸n

import { Routes, RouterModule, ... } from '@angular/router';

const routes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'path/:routeParam', component: MyComponent },
{ path: 'staticPath', component: ... },
{ path: '**', component: ... },
{ path: 'oldPath', redirectTo: '/staticPath' },
{ path: ..., component: ..., data: { message: 'Custom' } }
]);

const routing = RouterModule.forRoot(routes);

Configures routes for the application. Supports static, parameterized, redirect, and wildcard routes. Also supports custom route data and resolve.

+

Configura rutas para la aplicaci贸n. Soporta rutas est谩ticas, parametrizadas, de redireccionamiento y comodines. Tambi茅n soporta datos de ruta personalizados y los resuelve.


<router-outlet></router-outlet>
<router-outlet name="aux"></router-outlet>

Marks the location to load the component of the active route.

+

Marca la ubicaci贸n para cargar el componente de la ruta activa.


<a routerLink="/path">
<a [routerLink]="[ '/path', routeParam ]">
<a [routerLink]="[ '/path', { matrixParam: 'value' } ]">
<a [routerLink]="[ '/path' ]" [queryParams]="{ page: 1 }">
<a [routerLink]="[ '/path' ]" fragment="anchor">

Creates a link to a different view based on a route instruction consisting of a route path, required and optional parameters, query parameters, and a fragment. To navigate to a root route, use the / prefix; for a child route, use the ./prefix; for a sibling or parent, use the ../ prefix.

+

Crea un enlace a una vista diferente basada en una instrucci贸n de ruta que consta de un camino de de ruta, par谩metros obligatorios y opcionales, par谩metros de consulta y un fragmento. Para navegar a un camino de ruta, usa el prefijo /; para una ruta hija, usa el prefijo ./; para un padre o hermano, usa el prefijo ../.

<a [routerLink]="[ '/path' ]" routerLinkActive="active">

The provided classes are added to the element when the routerLink becomes the current active route.

+

Las clases proporcionadas se agregan al elemento cuando el routerLink se convierte en la ruta activa actual.

class CanActivateGuard implements CanActivate {
canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree { ... }
}

{ path: ..., canActivate: [CanActivateGuard] }

An interface for defining a class that the router should call first to determine if it should activate this component. Should return a boolean|UrlTree or an Observable/Promise that resolves to a boolean|UrlTree.

+

Una interfaz para definir una clase que el enrutador debe llamar primero para determinar si debe activar este componente. Debe devolver un boolean|UrlTree o un Observable/Promise que se resuelba en un boolean|UrlTree.

class CanDeactivateGuard implements CanDeactivate<T> {
canDeactivate(
component: T,
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree { ... }
}

{ path: ..., canDeactivate: [CanDeactivateGuard] }

An interface for defining a class that the router should call first to determine if it should deactivate this component after a navigation. Should return a boolean|UrlTree or an Observable/Promise that resolves to a boolean|UrlTree.

+

Una interfaz para definir una clase que el enrutador deber铆a llamar primero para determinar si deber铆a desactivar este componente despu茅s de una navegaci贸n. Debe devolver un boolean|UrlTree o un Observable/Promise que se resuelva a boolean|UrlTree.

class CanActivateChildGuard implements CanActivateChild {
canActivateChild(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree { ... }
}

{ path: ..., canActivateChild: [CanActivateGuard],
children: ... }

An interface for defining a class that the router should call first to determine if it should activate the child route. Should return a boolean|UrlTree or an Observable/Promise that resolves to a boolean|UrlTree.

+

Una interfaz para definir una clase que el enrutador debe llamar primero para determinar si debe activar la ruta hija. Debe devolver un boolean|UrlTree o un Observable/Promise que se resuelva en un boolean|UrlTree.

class ResolveGuard implements Resolve<T> {
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<any>|Promise<any>|any { ... }
}

{ path: ..., resolve: [ResolveGuard] }

An interface for defining a class that the router should call first to resolve route data before rendering the route. Should return a value or an Observable/Promise that resolves to a value.

+

Una interfaz para definir una clase que el enrutador debe llamar primero para resolver los datos de la ruta antes de representar la ruta. Debe devolver un valor o un Observable/Promise que se resuelva en un valor.

class CanLoadGuard implements CanLoad {
canLoad(
route: Route
): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree { ... }
}

{ path: ..., canLoad: [CanLoadGuard], loadChildren: ... }

An interface for defining a class that the router should call first to check if the lazy loaded module should be loaded. Should return a boolean|UrlTree or an Observable/Promise that resolves to a boolean|UrlTree.

+

Una interfaz para definir una clase a la que el enrutador debe llamar primero para verificar si el m贸dulo perezoso cargado (lazy loaded module) debe cargarse. Debe devolver un boolean|UrlTree o un Observable/Promise que se resuelva en un boolean|UrlTree.

diff --git a/aio/content/marketing/index.html b/aio/content/marketing/index.html index 1fb2e919a0..1c6419e759 100755 --- a/aio/content/marketing/index.html +++ b/aio/content/marketing/index.html @@ -41,8 +41,8 @@
-
Desarrollar en todas las plataformas
-

Aprenda una forma de crear aplicaciones con Angular y reutilice su c贸digo y habilidades para crear aplicaciones para cualquier objetivo de implementaci贸n. Para web, web m贸vil, m贸vil nativo y escritorio nativo. +

Desarrolla en todas las plataformas
+

Aprende una forma de crear aplicaciones con Angular y reutiliza tu c贸digo y habilidades para crear aplicaciones para cualquier objetivo de implementaci贸n. Para web, web m贸vil, m贸vil nativo y escritorio nativo.

@@ -54,7 +54,7 @@
Velocidad y Rendimiento
-

Logre la m谩xima velocidad posible en la Plataforma Web hoy y avance, a trav茅s de Web Workers y renderizado del lado del servidor.

+

Logra la m谩xima velocidad posible en la Plataforma Web hoy y avance, a trav茅s de Web Workers y renderizado del lado del servidor.

Angular te permite controlar la escalabilidad. Satisface requerimientos enormes de datos construyendo modelos en RxJS, Immutable.js o alg煤n otro.

@@ -76,7 +76,7 @@
Herramientas Incre铆bles
-

Cree funciones r谩pidamente con plantillas simples y declarativas. Extienda el lenguaje de plantilla con sus propios componentes y use una amplia gama de componentes existentes. Obtenga ayuda inmediata y comentarios espec铆ficos de Angular con casi todos los IDE y editores. Todo esto se une para que pueda concentrarse en crear aplicaciones incre铆bles en lugar de intentar que el c贸digo funcione. +

Crea funciones r谩pidamente con plantillas simples y declarativas. Extiende el lenguaje de plantilla con tus propios componentes y usa una amplia gama de componentes existentes. Obt茅n ayuda inmediata y comentarios espec铆ficos de Angular con casi todos los IDE y editores. Todo esto se une para que puedas concentrarte en crear aplicaciones incre铆bles en lugar de intentar que el c贸digo funcione.

@@ -108,7 +108,7 @@ Get Started with Angular
Pruebalo ahora
-

Explore las capacidades de Angular con una aplicaci贸n de muestra preparada. No se requiere configuraci贸n. +

Explora las capacidades de Angular con una aplicaci贸n de muestra preparada. No se requiere configuraci贸n.