ng-checked

문제상황

데이터 수정시 기존값이 선택된 채로 있어야 한다.


문제 해결

  • ng-checked 사용
// 수정하려는 기존 데이터의 프로토콜 값이 HTTP
<input type="radio" name="protocolRadio" id="protocolHTTP" ng-checked="pop.port.protocol == 'HTTP'">

ngchecked


Reference

angularjs에서-ngchecked-사용하여-체크박스-라디오-체크-변경하기

AngularJS ng-checked Directive

angularjs 공식 문서

Comments