AngularJS Input Controls - Checkbox, Radiobuttons, Selectbox

· 8년 전 · 1505
AngularJS Input Controls - Checkbox, Radiobuttons, Selectbox

체크 박스에는 true또는 값이 false있습니다.
ng-model지시문을 확인란에 적용하고 응용 프로그램에서 해당 값을 사용합니다.


<form>
Check to show a header:
<input type="checkbox" ng-model="myVar">
</form>

<h1 ng-show="myVar">My Header</h1>

Radiobuttons
ng-model 지시문 을 사용하여 응용 프로그램에 라디오 버튼을 바인딩 합니다.

동일한 버튼이있는 라디오 버튼 ng-model은 다른 값을 가질 수 있지만 선택한 버튼 만 사용됩니다.


선택한 라디오 버튼의 값에 따라 텍스트를 표시하십시오.
<form>
Pick a topic:
<input type="radio" ng-model="myVar" value="dogs">Dogs
<input type="radio" ng-model="myVar" value="tuts">Tutorials
<input type="radio" ng-model="myVar" value="cars">Cars
</form>
myVar에의 값이 될 것이다 dogs, tuts또는 cars.

Selectbox
ng-model 지시문 을 사용하여 응용 프로그램에 선택 상자를 바인딩하십시오 .

속성에 정의 된 ng-model속성은 선택 상자에서 선택한 옵션의 값을 갖습니다.

선택한 옵션의 값에 따라 텍스트를 표시하십시오.
<form>
Select a topic:
<select ng-model="myVar">
<option value="">
<option value="dogs">Dogs
<option value="tuts">Tutorials
<option value="cars">Cars
</select>
</form>
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

퍼블리싱강좌

+
분류 제목 글쓴이 날짜 조회
AngularJS 8년 전 조회 1,102
AngularJS 8년 전 조회 1,282
AngularJS 8년 전 조회 1,393
AngularJS 8년 전 조회 1,181
AngularJS 8년 전 조회 1,223
AngularJS 8년 전 조회 1,196
AngularJS 8년 전 조회 1,351
AngularJS 8년 전 조회 1,212
AngularJS 8년 전 조회 1,464
AngularJS 8년 전 조회 1,173
AngularJS 8년 전 조회 1,081
AngularJS 8년 전 조회 1,164
AngularJS 8년 전 조회 1,688
AngularJS 8년 전 조회 1,406
AngularJS 8년 전 조회 1,506
AngularJS 8년 전 조회 1,129
AngularJS 8년 전 조회 1,401
AngularJS 8년 전 조회 1,492
AngularJS 8년 전 조회 1,477
AngularJS 8년 전 조회 2,104
AngularJS 8년 전 조회 1,507
jQuery Mobile
[jQuery Mobile]
8년 전 조회 2,273
jQuery Mobile
[jQuery Mobile]
8년 전 조회 2,033
jQuery Mobile
[jQuery Mobile]
8년 전 조회 1,906
jQuery Mobile 8년 전 조회 1,823
jQuery Mobile
[jQuery Mobile]
8년 전 조회 1,861
jQuery Mobile
[jQuery Mobile]
8년 전 조회 2,080
jQuery Mobile
[jQuery Mobile]
8년 전 조회 1,615
jQuery Mobile
[jQuery Mobile]
8년 전 조회 1,684
jQuery Mobile 8년 전 조회 1,348
🐛 버그신고