0
저는 (-)와 같은 내부 편집을 위해 angle-xeditable을 드롭 다운으로 사용합니다. 이상한 점은 페이지가로드 된 직후에 xeditable 링크를 클릭하면 현재 값이 선택된 것으로 강조 표시되지 않는다는 것입니다. 왜 이런 일이 일어나고 있는지에 대한 아이디어가 있습니까?왜 angular-xeditable은 처음 실행시 현재 값을 강조 표시하지 않습니까?
HTML
Person: <a href="#" editable-select="user.name"
buttons="no"
e-ng-options="p as personDetails.text for (p, personDetails) in people">
{{people[user.name].text}} </a>
Status: <a href="#" editable-select="user.status"
buttons="no"
e-ng-options="s as statusDetails.text for (s, statusDetails) in statuses">
{{statuses[user.status].text}}
</a>
자바 스크립트
app.run(function(editableOptions) {
editableOptions.theme = 'bs3';
});
app.controller('Ctrl', function($scope, $filter) {
$scope.user = {
status: 2,
name: 2
};
$scope.statuses = {
'1': { text: 'status1'},
'2':{ text: 'status2'},
'3':{ text: 'status3'},
'4':{ text: 'status4'}
};
$scope.people = {
'1': { text: 'p1'},
'2':{ text: 'p2'},
'3':{ text: 'p3'},
'4':{ text: 'p4'}
};
});