Angular 템플릿의 배열 프로퍼티

마크업에서도 배열을 출력할 수 있습니다. 실제로 살펴보겠습니다. 다음과 같은 배열이 있다고 가정해 봅시다:

app/app.component.tsexport class AppComponent {
  public arr: string[] = ['a', 'b', 'c'];
}

우리 배열의 내용을 마크업에 출력해 보겠습니다:

app/app.component.html<div>
  {{ arr[0] }}
  {{ arr[1] }}
  {{ arr[2] }}
</div>
Задание 1

다음 배열이 주어졌습니다:

app/app.component.tsexport class AppComponent {
  public arr: number[] = [1, 2, 3, 4, 5];
}

이 배열의 각 요소를 별도의 단락에 출력하세요.