概要 Angular で *ngIf と [hidden] の個人的な使い分けを記載します。 基本的には表示・非表示の切り替え頻度が多いものは hidden にしています。 ブラウザの処理速度によっては ngIf だとDOM生成・破棄に時間がかかりレンダリングに影響するケースがあったため、切り替えが多い箇所はhiddenを個人的には推奨しています。 初回判定のみで切り替えがまったくないものについては ngIf を使用しています。 実行環境 Node.js 10.9.x 使用ライブラリ Angular 7.1.x サンプルソース ngIf import { Component } from '@angular/core'; @Component({ selector: "app-root", template: ` <input type="text" name="memo" require