Working on a simple contact form where I need to show an error message if the $scope is undefined.
The validation part works however I can't remember how to enable the view of the message under ng-show in the html side.
HTML:
<p class="response error" ng-show="error">{{errorMessage}}</p>
JS:
var $emptyContent = 'Please enter your prices.';
app.controller('priceForm', ['$scope', '$http', function($scope, $http){
$scope.formData;
// Process the form data
$scope.submitForm = function () {
console.log($scope.formData);
if($scope.formData == null) {
// Show empty content message
console.log($emptyContent);
}
}
}])