를 사용숨기기 편집 가능한 텍스트 속성 조건부 AngularJS와
<form editable-form name="userform" onaftersave="submitUser()">
<table class="user_table">
<tr class="userrow name">
<td class="info">First Name</td>
<td class="desc">
<span editable-text="curuser.firstName" e-name="firstName" e-maxlength="25">{{curuser.firstName}}</span>
</td>
</tr>
<tr class="userrow email">
<td class="info">E-Mail</td>
<td class="desc">
<span editable-email="curuser.email" e-name="email" e-maxlength="48">{{curuser.email}}</span>
</td>
</tr>
<tr class="userrow authority">
<td class="info">Role</td>
<td class="desc user-roles">
<span editable-select="roleUpdated" e-name="roles" e-ng-options="role as role.name for role in roles" onaftersave="updateRole(curuser, roleUpdated)">{{ showRoles() }}</span>
{{ showRoles() }}
</span>
</td>
</tr>
<tr ng-if="curuser.id == null" class="userrow command">
<td class="info"></td>
<td class="desc">
<button type="submit" class="submit_button btn btn-primary" ng-show="!readonly && !amanager">Submit</button>
</td>
</tr>
</table>
</form>
두 가지 기준이있다 한 사용자는 모든 필드와 다른 경우 사용자에있을 것를 업데이트 할 수 있어야있어서, 역할 편집, 즉 역할 선택 만 허용됨.
실제 문제는 양식 요소를 특정 조건에 따라 편집/편집 할 수 없게 만드는 것입니다. 편집 가능한 텍스트를 모든 필드에서 수동으로 제거하면 두 번째 기준을 충족시킵니다. 조건에 따라 편집 가능한 텍스트를 추가 할 수있는 방법이 있습니까?
누구든지 유용한 아이디어가 있습니까? 그들이 깨끗하게 분리되지 않는 JQuery와 및 AngularJS와 혼합하는 것은 좋은 방법이 아닙니다 사전
조건에 따라 속성을 추가 할 지시어를 만드는 방법은 무엇입니까? 그러나 저는 x-editable에 대한 지식이 없습니다. –