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 | 29 | 30 | 31 |
Tags
- 스크롤 이벤트 감지
- route
- 검색
- 셀렉트박스 커스텀
- 스크롤 이벤트
- modal
- Ionic modal
- TAILWIND
- ApexChart
- prisma
- formgroup
- angular modal
- Oracle LISTAGG 사용 예시
- mysql if
- angular route
- 호버
- 옵저버블
- Angular Router
- angular button
- 앵귤러 애니메이션
- scroll
- 앵귤러 모달
- ajax 사용 예시
- summary
- angular animation
- 모달
- 아이오닉 스크롤 이벤트
- egov spring ajax 사용 예시
- flex-1
- Router
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 |