//ControllerCode
angular.module("umbraco")
.controller("My.MarkdownEditorController",
function () {
$scope.txtName = "Hector";
});
------------------
//HTMLCode
<div ng-controller="My.MarkdownEditorController">
<textarea ng-model="txtName"></textarea>
</div>
--------------------------
//In Manifest , i am using following alias
alias: "My.MarkdownEditor",
Now my requirement is I want to fetch that textarea value in c# controller.
How would i do it ?
Reading Property editor value
I have made property editor in umbraco 7+ with angularjs by following this example - https://our.umbraco.org/documentation/tutorials/Creating-a-Property-Editor/
Now my requirement is I want to fetch that textarea value in c# controller. How would i do it ?
Hi Ariel
You can fetch data in c# with ContentService,
Read more:
https://our.umbraco.org/documentation/Reference/Management/Models/Content#getvalue-string-propertytypealias
On which stage you need it?
You can use Umbraco events for interception a save event and working with data directly after pressing save button, look please how to use events:
https://our.umbraco.org/documentation/reference/events/contentservice-events#usage
Hope it will help you, ask if it's not clear, please.
Thanks,
Alex
Hi Alex,
That worked. A big thank you.
You are welcome!!
/Alex
is working on a reply...