Introducción a Angular y Fundamentos

1

Aprende Angular 17

2

Creando tu primer proyecto en Angular

3

Implementando estilos

4

Mostrando elementos

5

Property Binding en Angular

6

Event Binding: click y doble click

7

Event binding: keydown

8

Modelo de reactividad con Signals

9

Creando un Signal en Angular

Estructuras de control en Angular

10

Directivas de control

11

Uso de ngFor

12

ngFor para objetos

13

Update Tasks

14

Uso de ngIf

15

Uso de ngSwitch y ngSwitchDefault

16

Controlando un input

17

Manejo de formularios en Angular

Alistando tu aplicación para producción

18

Estilos al modo Angular

19

Clases en Angular

20

Editing mode

21

Estados compuestos con computed

22

Usando effect para localStorage

23

Uso de ngbuild

24

Despliegue con Firebase Hosting

25

Nueva sintaxis en Angular

26

Directivas @For, @switch

27

Migrando a la nueva sintaxis de Angular v17

Componentes Reutilizables y Comunicación

28

Construyendo un e-commerce en Angular

29

Componentes en Angular

30

Mostrando los componentes

31

Angular DevTools

32

Uso de Inputs en Angular

33

Uso de Outputs en Angular

34

Componentes para Producto

Ciclo de vida de los componentes

35

Ciclo de vida de componentes

36

Ciclo de vida de componentes: ngOnChanges

37

Ciclo de vida de componentes: ngOnInit

38

Detectando cambios en los inputs

39

Evitando memory leaks con ngDestroy

40

Audio player con ngAfterViewInit

41

Creando la página "about us" o "conócenos"

Mejorando la interfaz del producto

42

Creando componente de productos

43

Creando el Header

44

Creando el carrito de compras

45

Comunicación padre e hijo

46

Calculando el total con ngOnChanges

47

El problema del prop drilling

48

Reactividad con signals en servicios

49

Entendiendo la inyección de dependencias

Integración y Datos

50

Obteniendo datos una REST API

51

Importaciones cortas en Typescript

52

Pipes en Angular

53

Construyendo tu propio pipe

54

Utilizando librerías de JavaScript en Angular

55

Conociendo las directivas

56

Deployando un proyecto en Vercel

Enrutamiento y Navegación

57

Ruta 404

58

Uso del RouterLink

59

Vistas anidadas

60

Uso del RouterLinkActive

61

Detalle de cada producto

62

Obteniendo datos del producto

63

Galería de imagenes

64

Detalle de la galería

Perfeccionando tu e-commerce

65

Mostrando categorias desde la API

66

Url Params

67

LazyLoading y Code Splitting

68

Aplicando LazyLoading

69

Prefetching

70

Usando la nueva sintaxis de Angular 17

71

Lanzando tu aplicación a producción

You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

1 Días
9 Hrs
33 Min
14 Seg

Implementando estilos

3/71
Resources

How to create a more ambitious application with Angular?

If you've already taken your first steps with Angular and created a simple application, it's time to get more ambitious. One of the best ways to expand your skills is to embark on a task management project. In this article, we'll explain how to bring this idea to life using Angular, particularly by creating new components and handling routing.

How to generate new components in Angular?

To create components that add functionality to your application, you can follow these steps:

  1. Open the terminal: We will use Angular CLI commands to generate the components.
  2. Use the generate command: Type ng g component followed by the path where you want to create the component. If you want to organize them, it is useful to create a folder called pages.
  3. Create specific components: For example, you can start with a home component for your main application and a labs component to experiment with Angular features.
  4. Example command:
    ng g component pages/homeng g component pages/labs

Each newly created component will include files for styles (CSS), structure (HTML) and logic (TypeScript), which makes it easy to organize the project.

How to implement basic routing in Angular?

Routing allows different sections of your application to redirect and function separately. This is essential to maintain a clear and divided logic in our application.

  1. Import the components: In the app.routes.ts file, import the components you want to use in the routes.
    import { HomeComponent } from './pages/home/home.component';import { LabsComponent } from './pages/labs/labs.component';
  2. Define the paths: Set the routes for each component, indicating the path and component.
    const routes: Routes = [ { { path: 'home', component: HomeComponent }, { path: 'labs', component: LabsComponent }, { path: '', component: HomeComponent } // Default route];
  3. Modify the home component: Use <router-outlet></router-outlet> in the home component to render the components on the defined paths.
    <router-outlet></router-outlet>
    .

What are the steps to improve the visual appearance?

A good application should not only work well, but also have a good design. Although in this article we won't go too deep into styles, here are some guidelines:

  1. Global style reference: Include global styles in the styles.css file. This file affects all components of the application.
  2. Component-specific styles: Each component has its own CSS file. Styles here only affect their respective component, which is useful for maintaining encapsulation.
  3. Applying a base design: Use a Gist URL or predefined resources that include a basic set of global styles to get started.

Why is it important to divide responsibilities in Angular?

Dividing responsibilities is key to the maintainability and scalability of any application. Angular facilitates this by:

  • Encapsulating logic and view: Each component handles its HTML, CSS and business logic.
  • Clarifying workflow: By using well-defined paths and components, it is easy to follow the flow and functionality of the application.
  • Encourage reuse: Well-designed components can be reused in different parts of the application or even in future projects.

With these practices, you can take your Angular application to a new level of complexity and functionality - keep exploring and experimenting to master Angular!

Contributions 45

Questions 8

Sort by:

Want to see more contributions, questions and answers from the community?

acá les dejo el ccs usado en la clase

/* You can add global styles to this file, and also import other style files */
html,
body {
  margin: 0;
  padding: 0;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 100%;
  vertical-align: baseline;
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Roboto", sans-serif;
  background: #f5f5f5;
  color: #111111;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 300;
}

:focus {
  outline: 0;
}

acá esta el css del home

.container {
    min-width: 230px;
    max-width: 550px;
    margin: 0 auto;
  }
  
  .header {
    background-image: linear-gradient(
      224deg,
      hsl(240deg 100% 50%) 2%,
      hsl(249deg 100% 59%) 63%,
      hsl(252deg 99% 64%) 78%,
      hsl(253deg 98% 68%) 87%,
      hsl(254deg 96% 73%) 92%,
      hsl(253deg 93% 77%) 96%,
      hsl(251deg 89% 81%) 98%,
      hsl(246deg 81% 85%) 99%,
      hsl(232deg 68% 88%) 100%,
      hsl(200deg 53% 90%) 100%
    );
    padding-bottom: 4rem;
  }
  
  .hidden {
    display: none;
  }
  
  .todoapp-wrapper {
    position: relative;
    top: -40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }
  
  .todoapp input::-webkit-input-placeholder {
    font-style: italic;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.4);
  }
  
  .todoapp input::-moz-placeholder {
    font-style: italic;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.4);
  }
  
  .todoapp input::input-placeholder {
    font-style: italic;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.4);
  }
  
  .header h1 {
    width: 100%;
    font-size: 3rem;
    font-weight: 200;
    color: white;
    padding-top: 2rem;
    margin: 0;
  }
  
  .header h1 + p {
    margin: 0;
    color: white;
    padding-bottom: 1.2rem;
  }
  
  .new-todo,
  .edit {
    position: relative;
    margin: 0;
    width: 100%;
    font-size: 24px;
    font-family: inherit;
    font-weight: inherit;
    line-height: 1.4em;
    color: inherit;
    padding: 6px;
    border: 1px solid #999;
    box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  .new-todo {
    padding: 2rem;
    height: 65px;
    border: none;
    background: white;
    box-shadow: inset 0 -2px 1px rgba(0, 0, 0, 0.03);
    border-radius: 8px;
  }
  
  .main {
    position: relative;
    z-index: 2;
    border-top: 1px solid #e6e6e6;
  }
  
  .toggle-all {
    width: 1px;
    height: 1px;
    border: none;
    /* Mobile Safari */
    opacity: 0;
    position: absolute;
    right: 100%;
    bottom: 100%;
  }
  
  .toggle-all + label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 65px;
    font-size: 0;
    position: absolute;
    top: -65px;
    left: -0;
  }
  
  .toggle-all + label:before {
    content: "❯";
    display: inline-block;
    font-size: 22px;
    color: #949494;
    padding: 10px 27px 10px 27px;
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
  }
  
  .toggle-all:checked + label:before {
    color: #484848;
  }
  
  .todo-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  .todo-list li {
    position: relative;
    font-size: 24px;
    border-bottom: 1px solid #ededed;
    padding: 0rem 1rem;
  }
  
  .todo-list li:last-child {
    border-bottom: none;
  }
  
  .todo-list li.editing {
    border-bottom: none;
    padding: 0;
  }
  
  .todo-list li.editing .edit {
    display: block;
    width: calc(100% - 4rem);
    padding: 12px 16px;
    margin: 0 0 0 4rem;
  }
  
  .todo-list li.editing .view {
    display: none;
  }
  
  .todo-list li .toggle {
    text-align: center;
    width: 40px;
    /* auto, since non-WebKit browsers doesn't support input styling */
    height: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto 0;
    border: none;
    /* Mobile Safari */
    -webkit-appearance: none;
    appearance: none;
  }
  
  .todo-list li .toggle {
    opacity: 0;
  }
  
  .todo-list li .toggle + label {
    /*
          Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433
          IE and Edge requires *everything* to be escaped to render, so we do that instead of just the `#` - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7157459/
      */
    background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23949494%22%20stroke-width%3D%223%22/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center left;
  }
  
  .todo-list li .toggle:checked + label {
    background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%2359A193%22%20stroke-width%3D%223%22%2F%3E%3Cpath%20fill%3D%22%233EA390%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22%2F%3E%3C%2Fsvg%3E");
  }
  
  .todo-list li label {
    word-break: break-all;
    padding: 15px 15px 15px 60px;
    display: block;
    line-height: 1.2;
    transition: color 0.4s;
    font-weight: 400;
    color: #484848;
  }
  
  .todo-list li.completed label {
    color: #949494;
    text-decoration: line-through;
  }
  
  .todo-list li .destroy {
    display: none;
    position: absolute;
    top: 0;
    right: 10px;
    bottom: 0;
    width: 40px;
    height: 40px;
    margin: auto 0;
    font-size: 30px;
    color: #949494;
    transition: color 0.2s ease-out;
  }
  
  .todo-list li .destroy:hover,
  .todo-list li .destroy:focus {
    color: #c18585;
  }
  
  .todo-list li .destroy:after {
    content: "×";
    display: block;
    height: 100%;
    line-height: 1.1;
  }
  
  .todo-list li:hover .destroy {
    display: block;
  }
  
  .todo-list li .edit {
    display: none;
  }
  
  .todo-list li.editing:last-child {
    margin-bottom: -1px;
  }
  
  .footer {
    padding: 1rem 1.5rem;
    height: 20px;
    text-align: center;
    font-size: 15px;
    border-top: 1px solid #e6e6e6;
  }
  
  .todo-count {
    float: left;
    text-align: left;
  }
  
  .todo-count strong {
    font-weight: 300;
  }
  
  .filters {
    margin: 0;
    padding: 0;
    list-style: none;
    position: absolute;
    right: 0;
    left: 0;
  }
  
  .filters li {
    display: inline;
  }
  
  .filters li a {
    color: inherit;
    margin: 3px;
    padding: 3px 7px;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 3px;
  }
  
  .filters li a:hover {
    border-color: #6e49fe;
  }
  
  .filters li a.selected {
    border-color: #4c33b1;
  }
  
  .clear-completed,
  html .clear-completed:active {
    float: right;
    position: relative;
    line-height: 19px;
    text-decoration: none;
    cursor: pointer;
  }
  
  .clear-completed:hover {
    text-decoration: underline;
  }
  
  .info {
    margin: 65px auto 0;
    color: #4d4d4d;
    font-size: 11px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    text-align: center;
  }
  
  .info p {
    line-height: 1;
  }
  
  .info a {
    color: inherit;
    text-decoration: none;
    font-weight: 400;
  }
  
  .info a:hover {
    text-decoration: underline;
  }
  
  /*
      Hack to remove background from Mobile Safari.
      Can't use it globally since it destroys checkboxes in Firefox
  */
  @media screen and (-webkit-min-device-pixel-ratio: 0) {
    .toggle-all,
    .todo-list li .toggle {
      background: none;
    }
  
    .todo-list li .toggle {
      height: 40px;
    }
  }
  
  @media (max-width: 430px) {
    .footer {
      height: 50px;
    }
  
    .filters {
      bottom: 10px;
    }
  }

acá esta el html del home

<section class="todoapp">
    <header class="header">
      <div class="container">
        <h1>My Day</h1>
        <p>All my tasks in one place</p>
        <input
          class="new-todo"
          placeholder="Type new todo"
          autofocus
          type="text"
        />
      </div>
    </header>
    <div class="container todoapp-wrapper">
      <!-- This section should be hidden by default and shown when there are todos -->
      <section class="main">
        <ul class="todo-list">
          <li class="completed">
            <div class="view">
              <input class="toggle" type="checkbox" checked />
              <label>Learn JavaScript</label>
              <button class="destroy"></button>
            </div>
            <input class="edit" value="Learn JavaScript" />
          </li>
          <li>
            <div class="view">
              <input class="toggle" type="checkbox" />
              <label>Buy a unicorn</label>
              <button class="destroy"></button>
            </div>
            <input class="edit" value="Buy a unicorn" />
          </li>
          <li class="editing">
            <div class="view">
              <input class="toggle" type="checkbox" />
              <label>Make dishes</label>
              <button class="destroy"></button>
            </div>
            <input class="edit" value="Make dishes" />
          </li>
        </ul>
      </section>
      <!-- This footer should be hidden by default and shown when there are todos -->
      <footer class="footer">
        <!-- This should be `0 items left` by default -->
        <span class="todo-count"><strong>0</strong> item left</span>
        <!-- Remove this if you don't implement routing -->
        <ul class="filters">
          <li>
            <a routerLink="/" class="selected">All</a>
          </li>
          <li>
            <a routerLink="/pending">Pending</a>
          </li>
          <li>
            <a routerLink="/completed">Completed</a>
          </li>
        </ul>
        <!-- Hidden if no completed items are left ↓ -->
        <button class="clear-completed">Clear completed</button>
      </footer>
    </div>
  </section>
Si usan el comando `ng g c components/form --dry-run` con el flag --dry-run te ejecuta el comando pero no crea el componente. Es útil cuando quieres verificar que la ruta donde se va a crear el componente sea correcta
me suelta este warning: "The `\*ngFor` directive was used in the template, but neither the `NgFor` directive nor the `CommonModule` was imported. Use Angular's built-in control flow @for or make sure that either the `NgFor` directive or the `CommonModule` is included in the `@Component.imports` array of this component.". basicamente me pide usar la nueva sintaxis y la lista tampoco se renderiza ;(, en el app.component si funcionaba.
Para los que les marca el siguiente error de 'router-outlet': `'router-outlet' is not a known element: 1. If 'router-outlet' is an Angular component, then verify that it is included in the '@Component.imports' of this component. 2. If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this component to suppress this message.` solo tienen que agregar lo sig: labs.component.ts ```ts import { RouterModule } from '@angular/router'; @Component({ selector: 'app-labs', standalone: true, imports: [RouterModule, CommonModule], templateUrl: './labs.component.html', styleUrl: './labs.component.css' }) ```
Link del gist para los estilos <https://gist.github.com/nicobytes/ba2252b0b5ac2cbdafc40c0accd24862>
pues yo instale angular 17 hice el \*ngFor y me dio warning y no me cargo la lista: ![](https://static.platzi.com/media/user_upload/image-f4a908f0-63e4-4dd7-8928-539ec961d0f7.jpg)
Preferí instalarle tailwind, porque me agiliza mucho el hacer los estilos
Cuando accedo a la URL del home o de labs , no esta cargando la pagina , carga el html que viene por defecto , a alguien mas le sucede me podrian ayudar por favor
Aca dejo el link de gist para los styles.css y home.component.css and home.component.html [Angular Course · GitHub](https://gist.github.com/nicobytes/ba2252b0b5ac2cbdafc40c0accd24862)
cursos turbo
En Angular, los estilos se pueden aplicar de manera global a través del archivo `styles.css`, lo cual afecta a toda la aplicación, o de forma específica en cada componente con su propio archivo de estilos, como `home.component.css`. Esto permite encapsular estilos y evitar conflictos.
Les recomiendo a los usuarios nuevos que vean la ayuda que tiene el mismo angular desde el cli usando la bandera --help por ejemplo: ```js $ng --help $ng g c --help $ng g s --help $ng serve --help $ng doc --help ```No tienen que aprender las opciones, simplemente revisar como se usan con la ayuda.
Cuando compilaba en la web, en la vista de labs no me cargaba la lista, esto fue debido a que en labs.component.ts me faltaba añadir la siguiente línea de código: *import* { CommonModule } *from* '@angular/common';
Los estilos a nivel de componente tienen prioridad sobre los globales? ¿Que ocurre si existen conflictos sobre una misma clase? y cuales son las buenas practicas en relación a este asunto? Gracias!
Que pasa Platzi, los 3 servidores caidos?? ![]()
Los componentes en Angular son bloques reutilizables de código que encapsulan la estructura, el estilo y la lógica de una parte de la interfaz de usuario. Cada componente tiene su propio archivo de HTML, CSS y TypeScript, lo que permite una separación clara de responsabilidades. Esto mejora la mantenibilidad y la escalabilidad de las aplicaciones. En la clase aprendiste a crear componentes y gestionar sus rutas, lo que es esencial para construir aplicaciones web dinámicas y organizadas con Angular.
💻🎬 Resumen de la clase: ![](https://static.platzi.com/media/user_upload/clase3-1-71216916-767a-4517-a89a-20c1b9521d56.jpg) ![](https://static.platzi.com/media/user_upload/clase3-2-bd27f669-d2e6-4ca0-aa23-adc06179da42.jpg) ![](https://static.platzi.com/media/user_upload/clase3-3-286d5f7d-6759-4f17-ace9-28b6aaae096f.jpg) ![](https://static.platzi.com/media/user_upload/clase3-4-4becc5ef-14bb-4c42-9c5c-9897d8098f74.jpg) ![](https://static.platzi.com/media/user_upload/clase3-5-7a5326a1-5671-4abd-87a0-64a332e2ff23.jpg) ![](https://static.platzi.com/media/user_upload/clase3-6-62174c27-06d1-4797-a87e-871ac552aa0e.jpg) ![](https://static.platzi.com/media/user_upload/clase3-7-4aeb1a29-73be-4084-90ab-2604b1bd0ec5.jpg) ![](https://static.platzi.com/media/user_upload/clase3-8-5292b6ef-68c8-460e-a908-e8fa5cc66a42.jpg) ![](https://static.platzi.com/media/user_upload/clase3-9-195e8608-6386-404d-ac99-d2b301ce9f5c.jpg) ![](https://static.platzi.com/media/user_upload/clase3-10-4921892a-2dc0-4d73-a283-d42d2be4f456.jpg) ![](https://static.platzi.com/media/user_upload/clase3-11-8ae0666b-8bff-4177-854e-f37411399509.jpg) ![](https://static.platzi.com/media/user_upload/clase3-12-fa4fabf4-c2a1-44c4-b124-634e2269c42a.jpg) ![](https://static.platzi.com/media/user_upload/clase3-13-bd9ad8d4-680b-438e-8d5e-f7f30300199d.jpg) ![](https://static.platzi.com/media/user_upload/clase3-14-85951452-13c4-42df-b0c5-858404bcedc5.jpg) ![](https://static.platzi.com/media/user_upload/clase3-15-532a422a-424a-4b1c-a7ff-326ae4c2faec.jpg) ![](https://static.platzi.com/media/user_upload/clase3-16-57211d07-74b9-4b21-b32a-90c4f00fd4d8.jpg) ![](https://static.platzi.com/media/user_upload/clase3-17-030e5336-2857-4b0c-8619-cc0f44becee2.jpg) ![](https://static.platzi.com/media/user_upload/clase3-18-fc8bbbd5-b574-4741-8d3f-652ebeb6500e.jpg) ![](https://static.platzi.com/media/user_upload/clase3-19-2fe46bf7-9fcb-4a7b-86f2-6104cbf51a77.jpg) ![](https://static.platzi.com/media/user_upload/clase3-20-2544ecf1-6b0f-4494-b612-60781f75f55b.jpg) ![](https://static.platzi.com/media/user_upload/clase3-21-ecdc0148-cb33-48fc-8084-3be96b6972be.jpg) ![](https://static.platzi.com/media/user_upload/clase3-22-eea6dc12-32a9-4486-9aaa-a1c3d5c87171.jpg) ![](https://static.platzi.com/media/user_upload/clase3-23-b489aa73-c3ba-4466-a5e3-74f666f5e85d.jpg) ![](https://static.platzi.com/media/user_upload/clase3-24-0288ad84-0e62-4f9e-af8b-ad9963d7d6b7.jpg) ![](https://static.platzi.com/media/user_upload/clase3-25-82e3d5c6-ad07-4fbe-9e14-fb631656b297.jpg) ![](https://static.platzi.com/media/user_upload/clase3-26-56b74f78-dbc5-4bb7-a65f-d87f31decfe5.jpg) ![](https://static.platzi.com/media/user_upload/clase3-27-f854de5e-f4d9-4ec6-a74f-6f3354a1263b.jpg)
👓Explicación del \<router-outlet> según Copilot: ![](https://static.platzi.com/media/user_upload/router-outlet-5f2b0a1a-ec3a-414b-9a6c-876efbce0bf5.jpg) ![](https://static.platzi.com/media/user_upload/router-outlet2-8911b640-6416-463d-8ac4-6a1bb0774531.jpg)
para que no les presente error o algo, al copiar y pegar de app.component.ts a labs.component.ts deben incluir nuevamente el import ```js import { Component } from '@angular/core'; import { CommonModule } from '@angular/common'; @Component({ selector: 'app-labs', imports: [CommonModule], templateUrl: './labs.component.html', styleUrl: './labs.component.css' }) export class LabsComponent { welcome = 'hola'; tasks = [ 'instalar el angular CLI', 'crear proyecto', 'crear componentes' ] } ```
Este problema puede estar relacionado con la configuración del enrutamiento en Angular. Asegúrate de que el `routerLink` esté correctamente configurado en tu aplicación. Si el enrutador está configurado correctamente, verifica que hayas importado las rutas en el módulo principal y que el `RouterOutlet` esté presente en tu plantilla. Además, asegúrate de que el archivo de rutas (`app.routes.ts`) tenga las rutas correctamente definidas. Si sigues teniendo problemas, intenta borrar la caché del navegador o verifica la consola para identificar errores de JavaScript que puedan estar afectando el enrutamiento.
Link de estilos <https://gist.github.com/nicobytes/ba2252b0b5ac2cbdafc40c0accd24862>
Hola a todos. Soy muy nuevo en Angular, tengo un problema con la aplicacion de los estilos CSS, segui al pie de la letra cada paso y no me salte nada (aparentemente), por algun motivo Angular no lo renderiza. No se si necesita una configuracion especial. * Utilizo Angular V19.0.2 Cualquier guia o ayuda es util, muchas gracias. ![](https://static.platzi.com/media/user_upload/image-a3fbd6bb-3044-4b25-98f1-2e95b232b9cb.jpg)
Este es el link del repositorio: <https://gist.github.com/nicobytes/ba2252b0b5ac2cbdafc40c0accd24862>
¿que conocimientos debo saber para aprender angular?
Cuando realizo la creacion del proyecto hay varios archivos que no se me generan, como el app-module.ts y el app-routing-component.ts Tendre que crearlos de forma manual? ![](https://static.platzi.com/media/user_upload/image-f2399485-49cc-4b82-b16b-c0e984df7bb7.jpg)
La versión de Angular que se está utilizando en este curso es Angular 17.
alguien puede pasarme los estilos por favor, no están en el el repo :(
Recuerden la ruta especifica para desplegar en servidor. D:\curso-angular-mydayapp\src\app> ng serve --watch
**💻Código HTML añadido en clase:** ```html <section class="todoapp"> <header class="header">

My Day

All my tasks in one place

<input class="new-todo" placeholder="Type new todo" autofocus type="text" >
</header>
<section class="main">
  • <input class="toggle" type="checkbox" checked> <label for="">Learn JavaScript</label> <button class="destroy"></button>
    <input class="edit" value="Learn JavaScript">
  • <input class="toggle" type="checkbox"> <label for="">Buy a unicorn</label> <button class="destroy"></button>
    <input class="edit" value="Buy a unicorn">
  • <input class="toggle" type="checkbox"> <label for="">Make dishes</label> <button class="destroy"></button>
    <input class="edit" value="Make dishes">
</section> <footer class="footer"> 0 item left <button class="clear-completed">Clear completed</button> </footer>
</section> ```  \<section class="todoapp">    \<header class="header">      \
        \

My Day\

        \

All my tasks in one place\

        \<input          class="new-todo"          placeholder="Type new todo"          autofocus          type="text"        >      \
    \</header>     \
      \<section class="main">        \
              \
  •             \
                  \<input class="toggle" type="checkbox" checked>              \<label for="">Learn JavaScript\</label>              \<button class="destroy">\</button>            \
                \<input class="edit" value="Learn JavaScript">          \
  •           \
  •             \
                  \<input class="toggle" type="checkbox">              \<label for="">Buy a unicorn\</label>              \<button class="destroy">\</button>            \
                \<input class="edit" value="Buy a unicorn">          \
  •           \
  •             \
                  \<input class="toggle" type="checkbox">              \<label for="">Make dishes\</label>              \<button class="destroy">\</button>            \
                \<input class="edit" value="Make dishes">          \
  •         \
      \</section>       \<footer class="footer">        \\0\ item left \         \
              \
  •             \All\          \
  •           \
  •             \Pending\          \
  •           \
  •             \Completed\          \
  •         \
        \<button class="clear-completed">Clear completed\</button>      \</footer>    \
  \</section>
**💻 Código html añadido en clase:** ```html <section class="todoapp"> <header class="header">

My Day

All my tasks in one place

<input class="new-todo" placeholder="Type new todo" autofocus type="text" >
</header>
<section class="main">
  • <input class="toggle" type="checkbox" checked> <label for="">Learn JavaScript</label> <button class="destroy"></button>
    <input class="edit" value="Learn JavaScript">
  • <input class="toggle" type="checkbox"> <label for="">Buy a unicorn</label> <button class="destroy"></button>
    <input class="edit" value="Buy a unicorn">
  • <input class="toggle" type="checkbox"> <label for="">Make dishes</label> <button class="destroy"></button>
    <input class="edit" value="Make dishes">
</section> <footer class="footer"> 0 item left <button class="clear-completed">Clear completed</button> </footer>
</section> ```
**💻 Código html añadido en clase:** ```js <section class="todoapp"> <header class="header">

My Day

All my tasks in one place

<input class="new-todo" placeholder="Type new todo" autofocus type="text" >
</header>
<section class="main">
  • <input class="toggle" type="checkbox" checked> <label for="">Learn JavaScript</label> <button class="destroy"></button>
    <input class="edit" value="Learn JavaScript">
  • <input class="toggle" type="checkbox"> <label for="">Buy a unicorn</label> <button class="destroy"></button>
    <input class="edit" value="Buy a unicorn">
  • <input class="toggle" type="checkbox"> <label for="">Make dishes</label> <button class="destroy"></button>
    <input class="edit" value="Make dishes">
</section> <footer class="footer"> 0 item left <button class="clear-completed">Clear completed</button> </footer>
</section> ```  \<section class="todoapp">    \<header class="header">      \
        \

My Day\

        \

All my tasks in one place\

        \<input          class="new-todo"          placeholder="Type new todo"          autofocus          type="text"        >      \
    \</header>     \
      \<section class="main">        \
              \
  •             \
                  \<input class="toggle" type="checkbox" checked>              \<label for="">Learn JavaScript\</label>              \<button class="destroy">\</button>            \
                \<input class="edit" value="Learn JavaScript">          \
  •           \
  •             \
                  \<input class="toggle" type="checkbox">              \<label for="">Buy a unicorn\</label>              \<button class="destroy">\</button>            \
                \<input class="edit" value="Buy a unicorn">          \
  •           \
  •             \
                  \<input class="toggle" type="checkbox">              \<label for="">Make dishes\</label>              \<button class="destroy">\</button>            \
                \<input class="edit" value="Make dishes">          \
  •         \
      \</section>       \<footer class="footer">        \\0\ item left \         \
              \
  •             \All\          \
  •           \
  •             \Pending\          \
  •           \
  •             \Completed\          \
  •         \
        \<button class="clear-completed">Clear completed\</button>      \</footer>    \
  \</section>
Ahora si he querido aprender esto de Router Outler, a redirigirlo las rutas y ver a que componente redirigirlo. Me late. Recuerden hacerlo todo en app.routes.ts y declarar la etiqueta Router-Uotler en su app.component.html
necesito ayuda eso de ng g component page/home no me crea la carpeta y ando renegando mas de 1h, tengo creado todo menos ese paso que esta el HTML y el lab...
No me aparece el archivo app.routes.ts, veo un app-routing.module.ts no se si sea para lo mismo?? Help please 🙏🏾 ![](https://static.platzi.com/media/user_upload/Screenshot%202024-02-13%20at%207.48.00%E2%80%AFp.m.-41a1d644-55ea-458b-b112-34661f6851ad.jpg)
La extensión para que se vea el error cuando ponemos private a las variables y otras muchas funcionalidades de Angular: **Angular Language Service** \--
¿Cómo puedo hacer para que al recargar se actualicen los cambios, así como el profesor? Porque me toca andar ejecutando el comando.
![](https://static.platzi.com/media/user_upload/image-9eb9bd24-9652-4a7a-9640-aa6b8f2858ac.jpg)
Que estilos de colores esta usando para visual studio code? Me gusta mas como se ve aquí que en mi editor
por que cuando actualizo me sale la pagina en blanco en lugar del home??
es demasiado lenta la web

por el momento se ve divertido. :))
No se que paso que cuando estaba haciendo los pasos me salto esto, alguien sabe que hacer? ![](https://static.platzi.com/media/user_upload/image-d6ecc52f-4307-4f80-ab31-1a309476ced0.jpg)