Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- formgroup
- Angular Router
- route
- 모달
- ajax 사용 예시
- summary
- angular modal
- flex-1
- 스크롤 이벤트
- 호버
- TAILWIND
- angular route
- 앵귤러 모달
- 옵저버블
- prisma
- egov spring ajax 사용 예시
- 검색
- 스크롤 이벤트 감지
- scroll
- ApexChart
- Router
- angular button
- mysql if
- 앵귤러 애니메이션
- Ionic modal
- 아이오닉 스크롤 이벤트
- angular animation
- modal
- Oracle LISTAGG 사용 예시
- 셀렉트박스 커스텀
Archives
- Today
- Total
깜놀하는 해므찌로
Angular Ionic ion radio checked 예시 / *ngFor checked radio 본문
반응형
SMALL
<div *ngFor="let item of auth" class="flex">
<label>{{item}}</label>
<input
formControlName="auth"
class="accent-primary w-12 y-12 cursor-pointer"
type="radio"
[value]="item"
[checked]="item === admin.auth"
/>
</div>
1. 첫 번째 방법
<div *ngFor="let role of roles" class="flex">
<label>{{role}}</label>
<input
(click)="handleRole(role)"
class="accent-primary w-12 y-12 cursor-pointer"
type="radio"
[checked]="role === adminForm.controls['role'].value"
/>
</div>
handleRole(role: string) {
this.adminForm.controls['role'].setValue(role);
}
2. 두 번째 방법
반응형
LIST
'IT' 카테고리의 다른 글
git ssh 등록 예시 git@github.com: Permission denied (publickey). ssh keygen (0) | 2023.04.20 |
---|---|
Can't bind to 'ngClass' since it isn't a known property of 해결 방법 (0) | 2023.04.20 |
Typescript 객체 배열 검색 / 객체 속성으로 검색하기 예시 (1) | 2023.04.20 |
CSS 줄바꿈 grid (0) | 2023.04.19 |
태그 이름 자동 변경 / auto tag rename (0) | 2023.04.19 |