Can someone please explain to me in this directive what means value:'=editable' and field:'@fieldType' in this directive I am new with learning AngularJS ?
myApp.directive('editable', function () {
return {
restrict: 'AE',
templateUrl: "Partials/editable.html",
scope: {
value: '=editable',
field: '@fieldType'
},
controller: function ($scope) {
$scope.editor = {
showing: false,
value: $scope.value
};
$scope.field = ($scope.field) ? $scope.field : 'text';
$scope.toggleEditor = function () {
$scope.editor.showing = !$scope.editor.showing;
}
$scope.save = function () {
$scope.value = $scope.editor.value;
$scope.toggleEditor();
}
}
};
});