I'm trying to save an AngularJS $scope variable, htmlContent, into a JavaScript variable, test, so I can send the data to a c# controller method. However it is not working. What am I doing wrong?
<script type="text/javascript">
angular.module("textAngularTest", ['textAngular']);
function wysiwygeditor($scope) {
$scope.orightml = '<h2>New Note...</h2>';
$scope.htmlcontent = $scope.orightml;
$scope.disabled = false;
//I'm not getting any data passed to the "test" variable
var test = $scope.htmlcontent;
$("#newnote").click(function () {
$.post("/Home/SaveWNote", { jsonData: test });
});
};
</script>
$scope.htmlcontentto a ActionResult in my controller?