}).
error(function(data, status, headers, config) { }); }; $scope.$watch('content', function(newVal, oldVal) { if (angular.isDefined(newVal)) { console.log($("<div>").html(newVal).text().replace(/(\r\n|\n|\r)/gm,"").replace(/^\s+/g," ").replace(/\s+$/g," ")); var length=$("<div>").html(newVal).text().replace(/(\r\n|\n|\r)/gm,"").replace(/^\s+/g," ").replace(/\s+$/g," ").length; if (length>0) { $scope.disabledSubmit=false; } else { $scope.disabledSubmit=true; } } }); $scope.submit=function() { var url='/Demo/comment',