Radiolist Xeditable Angular
Radiolist not working
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<link rel="stylesheet" href="https://raw.githubusercontent.com/vitalets/angular-xeditable/master/dist/css/xeditable.css">
<script src="https://rawgit.com/vitalets/angular-xeditable/0.1.9/dist/js/xeditable.js"></script>
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://rawgit.com/vitalets/angular-xeditable/0.5.0/dist/js/xeditable.js"></script>
<div ng-app="app" ng-controller="RadiolistCtrl">
<a href="#" editable-radiolist="user.status" e-ng-change=(callmyfunc($data)) e-ng-options="s.value as s.text for s in statuses">
{{ showStatus() }}
</a>
</div>
JavaScript
var app = angular.module("app", ["xeditable"]);
app.run(function (editableOptions) {
editableOptions.theme = 'bs3';
});
app.controller('RadiolistCtrl', function ($scope, $filter) {
$scope.callmyfunc = function(data){
console.log(data)
}
$scope.user = {
status: true
};
$scope.statuses = [{
value: true,
text: 'status1'
}, {
value: false,
text: 'status2'
}];
$scope.showStatus = function () {
var selected = $filter('filter')($scope.statuses, {
value: $scope.user.status
});
return ($scope.user.status && selected.length) ? selected[0].text : 'Not set';
};
});