본문 바로가기 메뉴 바로가기

개발과 취미

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

개발과 취미

검색하기 폼
  • 분류 전체보기 (22)
    • Javascript (5)
      • 비동기 프로그래밍 (5)
    • Angular8 (13)
    • 주식 모으기 (1)
  • 방명록

Angular8 (13)
[Angular] ngIf structure directive 구조 디렉티브

사용예시 hello import { Component, OnInit, ViewChild } from '@angular/core'; @Component({ selector: 'app-test', templateUrl: './test.component.html', styleUrls: ['./test.component.css'] }) export class TestComponent implements OnInit { view = true; constructor() { } ngOnInit() { } } 이 경우 view 의 값이 true 이기 때문에 hello 가 출력된다. 여기서 *를 쓰는 ngIf 가 구조 디렉티브 이기 때문이다. 구조 디렉티브란 DOM 의 구조를 변형시키는 디렉티브란 뜻이다. 즉 true ..

Angular8 2020. 4. 7. 17:40
이전 1 2 3 4 5 6 7 ··· 13 다음
이전 다음

Blog is powered by Tistory / Designed by Tistory

티스토리툴바