0
使用x-editable dependency,我想在单击基础图像元素时编辑另一个元素。使用x-editable在点击时编辑不同的元素
<h4>Angular-xeditable Text (Bootstrap 3)</h4>
<div ng-app="app" ng-controller="Ctrl">
<h3 class="m-t-lg m-b-sm inline-block" id="line{{lineId}}" editable-text="headingLineContent.someText">{{ headingLineContent }}</h3><br>
<a href="" class="disabled"><i class="fa fa-pencil pencil m-l-sm" ng-click="">{{ myImage }}</i></a>
</div>
这里是JS:
var app = angular.module("app", ["xeditable"]);
app.run(function(editableOptions) {
editableOptions.theme = 'bs3';
});
app.controller('Ctrl', function($scope) {
$scope.headingLineContent = 'Some Text';
$scope.myImage = 'MyImage.jpg';
});
这里是小提琴:http://jsfiddle.net/emporio/h1zsw5nu/4/
当我点击的基本要素所以基本上,上面的文字应成为可编辑的。