+
+## Local development environment
+
+NOTE: This step is only for your local environment!
+
+Perform these steps in a command-line tool on the computer you want to use for this tutorial.
+
+
+
-## Local development environment
+## Entorno de desarrollo local
-NOTE: This step is only for your local environment!
+NOTA: ¡Este paso es solo para tu entorno local!
-Perform these steps in a command-line tool on the computer you want to use for this tutorial.
+Realiza estos pasos en una herramienta de línea de comandos en la computadora que quieras usar para este tutorial.
+
+1. Si detuviste el comando `ng serve` del paso 1, en la ventana de **Terminal** de tu IDE, ejecuta `ng serve` nuevamente.
+1. Abre tu navegador y navega a `localhost:4200` y confirma que la aplicación se construye sin errores y muestra _Homes_ en el título y _Hello world_ en el cuerpo de tu aplicación:
+
+
+
+
+
+
+
+
+
+
+1. Correct any errors before you continue to the next step.
+
+
-1. Correct any errors before you continue to the next step.
+1. Corrige cualquier error antes de continuar al siguiente paso.
+
+
+
+
+
+details works! {{ housingLocationId }}
`, + ``` + +1. Update the body of the `Details` class with the following code: + + ```ts + export class Details { + route: ActivatedRoute = inject(ActivatedRoute); + housingLocationId = -1; + constructor() { + this.housingLocationId = Number(this.route.snapshot.params['id']); + } + } + ``` + + This code gives the `Details` access to the `ActivatedRoute` router feature that enables you to have access to the data about the current route. In the `constructor`, the code converts the `id` parameter acquired from the route from a string to a number. + +1. Save all changes. + +1. In the browser, click on one of the housing location's "Learn More" links and confirm that the numeric value displayed on the page matches the `id` property for that location in the data. +
+
+
+
details works! {{ housingLocationId }}
`, ``` -1. Update the body of the `Details` class with the following code: +1. Actualiza el cuerpo de la clase `Details` con el siguiente código: ```ts export class Details { @@ -66,73 +66,73 @@ In this step, you will get the route parameter in the `Details`. Currently, the } ``` - This code gives the `Details` access to the `ActivatedRoute` router feature that enables you to have access to the data about the current route. In the `constructor`, the code converts the `id` parameter acquired from the route from a string to a number. + Este código le da a `Details` acceso a la funcionalidad del router `ActivatedRoute` que te permite tener acceso a los datos sobre la ruta actual. En el `constructor`, el código convierte el parámetro `id` adquirido de la ruta de string a número. -1. Save all changes. +1. Guarda todos los cambios. -1. In the browser, click on one of the housing location's "Learn More" links and confirm that the numeric value displayed on the page matches the `id` property for that location in the data. +1. En el navegador, haz clic en uno de los enlaces "Learn More" de una ubicación de vivienda y confirma que el valor numérico mostrado en la página coincide con la propiedad `id` para esa ubicación en los datos.
+
+
+
+
+
+