Skip to content

Commit 0c6622b

Browse files
ricardochlSplaktar
authored andcommitted
translate: translations for first app Angular tutorial
Fixes #163
1 parent 0022788 commit 0c6622b

30 files changed

Lines changed: 2124 additions & 658 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Build your first Angular app
2+
3+
This tutorial consists of lessons that introduce the Angular concepts you need to know to start coding in Angular.
4+
5+
You can do as many or as few as you would like and you can do them in any order.
6+
7+
HELPFUL: Prefer video? We also have a full [YouTube course](https://youtube.com/playlist?list=PL1w1q3fL4pmj9k1FrJ3Pe91EPub2_h4jF&si=1q9889ulHp8VZ0e7) for this tutorial!
8+
9+
<docs-video src="https://www.youtube.com/embed/xAT0lHYhHMY?si=cKUW_MGn3MesFT7o"/>
10+
11+
## Before you start
12+
13+
For the best experience with this tutorial, review these requirements to make sure you have what you need to be successful.
14+
15+
### Your experience
16+
17+
The lessons in this tutorial assume that you have experience with the following:
18+
19+
1. Created an HTML web page by editing the HTML directly.
20+
1. Programmed web site content in JavaScript.
21+
1. Read Cascading Style Sheet (CSS) content and understand how selectors are used.
22+
1. Used command-line instructions to perform tasks on your computer.
23+
24+
### Your equipment
25+
26+
These lessons can be completed using a local installation of the Angular tools or in our embedded editor. Local Angular development can be completed on Windows, MacOS or Linux based systems.
27+
28+
NOTE: Look for alerts like this one, which call out steps that may only be for your local editor.
29+
30+
## Conceptual preview of your first Angular app
31+
32+
The lessons in this tutorial create an Angular app that lists houses for rent and shows the details of individual houses.
33+
This app uses features that are common to many Angular apps.
34+
35+
<img alt="Output of homes landing page" src="assets/images/tutorials/first-app/homes-app-landing-page.png">
36+
37+
## Local development environment
38+
39+
NOTE: This step is only for your local environment!
40+
41+
Perform these steps in a command-line tool on the computer you want to use for this tutorial.
42+
43+
<docs-workflow>
44+
45+
<docs-step title="Identify the version of `node.js` that Angular requires">
46+
Angular requires an active LTS or maintenance LTS version of Node. Let's confirm your version of `node.js`. For information about specific version requirements, see the engines property in the [package.json file](https://unpkg.com/browse/@angular/core@15.1.5/package.json).
47+
48+
From a **Terminal** window:
49+
50+
1. Run the following command: `node --version`
51+
1. Confirm that the version number displayed meets the requirements.
52+
</docs-step>
53+
54+
<docs-step title="Install the correct version of `node.js` for Angular">
55+
If you do not have a version of `node.js` installed, please follow the [directions for installation on nodejs.org](https://nodejs.org/en/download/)
56+
</docs-step>
57+
58+
<docs-step title="Install the latest version of Angular">
59+
With `node.js` and `npm` installed, the next step is to install the [Angular CLI](tools/cli) which provides tooling for effective Angular development.
60+
61+
From a **Terminal** window run the following command: `npm install -g @angular/cli`.
62+
</docs-step>
63+
64+
<docs-step title="Install integrated development environment (IDE)">
65+
You are free to use any tool you prefer to build apps with Angular. We recommend the following:
66+
67+
1. [Visual Studio Code](https://code.visualstudio.com/)
68+
2. As an optional, but recommended step you can further improve your developer experience by installing the [Angular Language Service](https://marketplace.visualstudio.com/items?itemName=Angular.ng-template)
69+
3. [WebStorm](https://www.jetbrains.com/webstorm/)
70+
</docs-step>
71+
72+
<docs-step title="Optional: set-up your AI powered IDE">
73+
74+
In case you're following this tutorial in your preferred AI powered IDE, [check out Angular prompt rules and best practices](/ai/develop-with-ai).
75+
76+
</docs-step>
77+
78+
</docs-workflow>
79+
80+
For more information about the topics covered in this lesson, visit:
81+
82+
<docs-pill-row>
83+
<docs-pill href="/overview" title="What is Angular"/>
84+
<docs-pill href="/tools/cli/setup-local" title="Setting up the local environment and workspace"/>
85+
<docs-pill href="/cli" title="Angular CLI Reference"/>
86+
</docs-pill-row>
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,86 @@
1-
# Build your first Angular app
1+
# Construye tu primera aplicación Angular
22

3-
This tutorial consists of lessons that introduce the Angular concepts you need to know to start coding in Angular.
3+
Este tutorial consiste en lecciones que introducen los conceptos de Angular que necesitas conocer para comenzar a programar en Angular.
44

5-
You can do as many or as few as you would like and you can do them in any order.
5+
Puedes hacer tantas como quieras, o pocas, y puedes hacerlas en cualquier orden.
66

7-
HELPFUL: Prefer video? We also have a full [YouTube course](https://youtube.com/playlist?list=PL1w1q3fL4pmj9k1FrJ3Pe91EPub2_h4jF&si=1q9889ulHp8VZ0e7) for this tutorial!
7+
ÚTIL: ¿Prefieres video? También tenemos un [curso completo en YouTube](https://youtube.com/playlist?list=PL1w1q3fL4pmj9k1FrJ3Pe91EPub2_h4jF&si=1q9889ulHp8VZ0e7) para este tutorial.
88

99
<docs-video src="https://www.youtube.com/embed/xAT0lHYhHMY?si=cKUW_MGn3MesFT7o"/>
1010

11-
## Before you start
11+
## Antes de comenzar
1212

13-
For the best experience with this tutorial, review these requirements to make sure you have what you need to be successful.
13+
Para obtener la mejor experiencia con este tutorial, revisa estos requisitos para asegurarte de que tienes lo necesario para tener éxito.
1414

15-
### Your experience
15+
### Tu experiencia
1616

17-
The lessons in this tutorial assume that you have experience with the following:
17+
Las lecciones en este tutorial asumen que tienes experiencia con lo siguiente:
1818

19-
1. Created an HTML web page by editing the HTML directly.
20-
1. Programmed web site content in JavaScript.
21-
1. Read Cascading Style Sheet (CSS) content and understand how selectors are used.
22-
1. Used command-line instructions to perform tasks on your computer.
19+
1. Has creado una página web HTML editando el HTML directamente.
20+
1. Has programado contenido de sitios web en JavaScript.
21+
1. Has leído contenido de hojas de estilo en cascada (CSS) y entiendes cómo se usan los selectores.
22+
1. Has usado instrucciones de línea de comandos para realizar tareas en tu computadora.
2323

24-
### Your equipment
24+
### Tu equipo
2525

26-
These lessons can be completed using a local installation of the Angular tools or in our embedded editor. Local Angular development can be completed on Windows, MacOS or Linux based systems.
26+
Estas lecciones se pueden completar usando una instalación local de las herramientas de Angular o en nuestro editor integrado. El desarrollo local de Angular se puede completar en sistemas Windows, MacOS o Linux.
2727

28-
NOTE: Look for alerts like this one, which call out steps that may only be for your local editor.
28+
NOTA: Busca alertas como esta, que señalan pasos que pueden ser solo para tu editor local.
2929

30-
## Conceptual preview of your first Angular app
30+
## Vista previa conceptual de tu primera aplicación Angular
3131

32-
The lessons in this tutorial create an Angular app that lists houses for rent and shows the details of individual houses.
33-
This app uses features that are common to many Angular apps.
32+
Las lecciones en este tutorial crean una aplicación Angular que lista casas en renta y muestra los detalles de casas individuales.
33+
Esta aplicación utiliza características que son comunes a muchas aplicaciones Angular.
3434

35-
<img alt="Output of homes landing page" src="assets/images/tutorials/first-app/homes-app-landing-page.png">
35+
<img alt="Resultado de la página de inicio de la aplicación de viviendas" src="assets/images/tutorials/first-app/homes-app-landing-page.png">
3636

37-
## Local development environment
37+
## Entorno de desarrollo local
3838

39-
NOTE: This step is only for your local environment!
39+
NOTA: ¡Este paso es solo para tu entorno local!
4040

41-
Perform these steps in a command-line tool on the computer you want to use for this tutorial.
41+
Realiza estos pasos en una herramienta de línea de comandos en la computadora que quieras usar para este tutorial.
4242

4343
<docs-workflow>
4444

45-
<docs-step title="Identify the version of `node.js` that Angular requires">
46-
Angular requires an active LTS or maintenance LTS version of Node. Let's confirm your version of `node.js`. For information about specific version requirements, see the engines property in the [package.json file](https://unpkg.com/browse/@angular/core@15.1.5/package.json).
45+
<docs-step title="Identifica la versión de `node.js` que Angular requiere">
46+
Angular requiere una versión LTS activa o LTS de mantenimiento de Node. Confirmemos tu versión de `node.js`. Para obtener información sobre los requisitos de versión específicos, consulta la propiedad engines en el [archivo package.json](https://unpkg.com/browse/@angular/core@15.1.5/package.json).
4747

48-
From a **Terminal** window:
48+
Desde una ventana de **Terminal**:
4949

50-
1. Run the following command: `node --version`
51-
1. Confirm that the version number displayed meets the requirements.
50+
1. Ejecuta el siguiente comando: `node --version`
51+
1. Confirma que el número de versión mostrado cumple con los requisitos.
5252
</docs-step>
5353

54-
<docs-step title="Install the correct version of `node.js` for Angular">
55-
If you do not have a version of `node.js` installed, please follow the [directions for installation on nodejs.org](https://nodejs.org/en/download/)
54+
<docs-step title="Instala la versión correcta de `node.js` para Angular">
55+
Si no tienes una versión de `node.js` instalada, sigue las [instrucciones de instalación en nodejs.org](https://nodejs.org/en/download/)
5656
</docs-step>
5757

58-
<docs-step title="Install the latest version of Angular">
59-
With `node.js` and `npm` installed, the next step is to install the [Angular CLI](tools/cli) which provides tooling for effective Angular development.
58+
<docs-step title="Instala la última versión de Angular">
59+
Con `node.js` y `npm` instalados, el siguiente paso es instalar el [Angular CLI](tools/cli) que proporciona herramientas para el desarrollo efectivo de Angular.
6060

61-
From a **Terminal** window run the following command: `npm install -g @angular/cli`.
61+
Desde una ventana de **Terminal** ejecuta el siguiente comando: `npm install -g @angular/cli`.
6262
</docs-step>
6363

64-
<docs-step title="Install integrated development environment (IDE)">
65-
You are free to use any tool you prefer to build apps with Angular. We recommend the following:
64+
<docs-step title="Instala el entorno de desarrollo integrado (IDE)">
65+
Eres libre de usar cualquier herramienta que prefieras para construir aplicaciones con Angular. Recomendamos lo siguiente:
6666

6767
1. [Visual Studio Code](https://code.visualstudio.com/)
68-
2. As an optional, but recommended step you can further improve your developer experience by installing the [Angular Language Service](https://marketplace.visualstudio.com/items?itemName=Angular.ng-template)
68+
2. Como paso opcional pero recomendado, puedes mejorar aún más tu experiencia de desarrollo instalando el [Angular Language Service](https://marketplace.visualstudio.com/items?itemName=Angular.ng-template)
6969
3. [WebStorm](https://www.jetbrains.com/webstorm/)
7070
</docs-step>
7171

72-
<docs-step title="Optional: set-up your AI powered IDE">
72+
<docs-step title="Opcional: configura tu IDE con IA">
7373

74-
In case you're following this tutorial in your preferred AI powered IDE, [check out Angular prompt rules and best practices](/ai/develop-with-ai).
74+
En caso de que estés siguiendo este tutorial en tu IDE con IA preferido, [consulta las reglas de prompt y mejores prácticas de Angular](/ai/develop-with-ai).
7575

7676
</docs-step>
7777

7878
</docs-workflow>
7979

80-
For more information about the topics covered in this lesson, visit:
80+
Para obtener más información sobre los temas cubiertos en esta lección, visita:
8181

8282
<docs-pill-row>
83-
<docs-pill href="/overview" title="What is Angular"/>
84-
<docs-pill href="/tools/cli/setup-local" title="Setting up the local environment and workspace"/>
85-
<docs-pill href="/cli" title="Angular CLI Reference"/>
83+
<docs-pill href="/overview" title="¿Qué es Angular?"/>
84+
<docs-pill href="/tools/cli/setup-local" title="Configuración del entorno local y espacio de trabajo"/>
85+
<docs-pill href="/cli" title="Referencia del CLI de Angular"/>
8686
</docs-pill-row>
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Hello world
2+
3+
This first lesson serves as the starting point from which each lesson in this tutorial adds new features to build a complete Angular app. In this lesson, we'll update the application to display the famous text, "Hello World".
4+
5+
<docs-video src="https://www.youtube.com/embed/UnOwDuliqZA?si=uML-cDRbrxmYdD_9"/>
6+
7+
## What you'll learn
8+
9+
The updated app you have after this lesson confirms that you and your IDE are ready to begin creating an Angular app.
10+
11+
NOTE: If you are working with the embedded editor, skip to [step four](#create-hello-world).
12+
When working in the browser playground, you do not need to `ng serve` to run the app. Other commands like `ng generate` can be done in the console window to your right.
13+
14+
<docs-workflow>
15+
16+
<docs-step title="Download the default app">
17+
Start by clicking the "Download" icon in the top right pan of the code editor. This will download a `.zip` file containing the source code for this tutorial. Open this in your local Terminal and IDE then move on to testing the default app.
18+
19+
At any step in the tutorial, you can click this icon to download the step's source code and start from there.
20+
</docs-step>
21+
22+
<docs-step title="Test the default app">
23+
In this step, after you download the default starting app, you build the default Angular app.
24+
This confirms that your development environment has what you need to continue the tutorial.
25+
26+
In the **Terminal** pane of your IDE:
27+
28+
1. In your project directory, navigate to the `first-app` directory.
29+
1. Run this command to install the dependencies needed to run the app.
30+
31+
```shell
32+
npm install
33+
```
34+
35+
1. Run this command to build and serve the default app.
36+
37+
```shell
38+
ng serve
39+
```
40+
41+
The app should build without errors.
42+
43+
1. In a web browser on your development computer, open `http://localhost:4200`.
44+
1. Confirm that the default web site appears in the browser.
45+
1. You can leave `ng serve` running as you complete the next steps.
46+
</docs-step>
47+
48+
<docs-step title="Review the files in the project">
49+
In this step, you get to know the files that make up a default Angular app.
50+
51+
In the **Explorer** pane of your IDE:
52+
53+
1. In your project directory, navigate to the `first-app` directory.
54+
1. Open the `src` directory to see these files.
55+
1. In the file explorer, find the Angular app files (`/src`).
56+
1. `index.html` is the app's top level HTML template.
57+
1. `styles.css` is the app's top level style sheet.
58+
1. `main.ts` is where the app starts running.
59+
1. `favicon.ico` is the app's icon, just as you would find in any web site.
60+
1. In the file explorer, find the Angular app's component files (`/app`).
61+
1. `app.ts` is the source file that describes the `app-root` component.
62+
This is the top-level Angular component in the app. A component is the basic building block of an Angular application.
63+
The component description includes the component's code, HTML template, and styles, which can be described in this file, or in separate files.
64+
65+
In this app, the styles are in a separate file while the component's code and HTML template are in this file.
66+
67+
1. `app.css` is the style sheet for this component.
68+
1. New components are added to this directory.
69+
70+
1. In the file explorer, find the image directory (`/assets`) that contains images used by the app.
71+
1. In the file explorer, find the files and directories that an Angular app needs to build and run, but they are not files that you normally interact with.
72+
1. `.angular` has files required to build the Angular app.
73+
1. `.e2e` has files used to test the app.
74+
1. `.node_modules` has the node.js packages that the app uses.
75+
1. `angular.json` describes the Angular app to the app building tools.
76+
1. `package.json` is used by `npm` (the node package manager) to run the finished app.
77+
1. `tsconfig.*` are the files that describe the app's configuration to the TypeScript compiler.
78+
79+
After you have reviewed the files that make up an Angular app project, continue to the next step.
80+
</docs-step>
81+
82+
<docs-step title="Create `Hello World`">
83+
In this step, you update the Angular project files to change the displayed content.
84+
85+
In your IDE:
86+
87+
1. Open `first-app/src/index.html`.
88+
NOTE: This step and the next are only for your local environment!
89+
90+
1. In `index.html`, replace the `<title>` element with this code to update the title of the app.
91+
92+
<docs-code header="Replace in src/index.html" path="adev/src/content/tutorials/first-app/steps/02-Home/src/index.html" visibleLines="[5]"/>
93+
94+
Then, save the changes you just made to `index.html`.
95+
96+
1. Next, open `first-app/src/app/app.ts`.
97+
1. In `app.ts`, in the `@Component` definition, replace the `template` line with this code to change the text in the app component.
98+
99+
<docs-code language="angular-ts" header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/02-Home/src/app/app.ts" visibleLines="[6,8]"/>
100+
101+
1. In `app.ts`, in the `App` class definition, replace the `title` line with this code to change the component title.
102+
103+
<docs-code header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/02-Home/src/app/app.ts" visibleLines="[11,13]"/>
104+
105+
Then, save the changes you made to `app.ts`.
106+
107+
1. If you stopped the `ng serve` command from step 1, in the **Terminal** window of your IDE, run `ng serve` again.
108+
1. Open your browser and navigate to `localhost:4200` and confirm that the app builds without error and displays _Homes_ in the title and _Hello world_ in the body of your app:
109+
<img alt="browser frame of page displaying the text 'Hello World'" src="assets/images/tutorials/first-app/homes-app-lesson-01-browser.png">
110+
</docs-step>
111+
112+
</docs-workflow>
113+
114+
SUMMARY: In this lesson, you updated a default Angular app to display _Hello world_.
115+
In the process, you learned about the `ng serve` command to serve your app locally for testing.
116+
117+
For more information about the topics covered in this lesson, visit:
118+
119+
<docs-pill-row>
120+
<docs-pill href="guide/components" title="Angular Components"/>
121+
<docs-pill href="tools/cli" title="Creating applications with the Angular CLI"/>
122+
</docs-pill-row>

0 commit comments

Comments
 (0)