인라인 타입
<p [ngStyle]="{color: 'red', backgroundColor: 'blue'}">
예제 입니다.
</p>
메서드타입
<p [ngStyle]="{color: 'red', backgroundColor: getBackgroundColor()}">
ts 파일에서 메서드 생성
getBackgroundColor() : string {
//return "black"; //문자열 반환
return (new Date()).getSeconds() % 2 == 0 ? "green" : "lime"; // 새로고침 시점이 짝수 초일때 초록색, 아닐때 라임색
}
## 정리 필요