Using ng-model automatically binds any value entered into the input to a $scope variable of the same name.
This variable becomes available to plain JavaScript within your controller when you inject a dependency upon scope into it.
So $scope.deadline will give the current value of text entered into that input.
How you check that value depends on the context of when you'd like to check it.
If you're in an existing function, such as a function checking field validation upon form submission, a simple
if ($scope.deadline) {
// do something
} else {
// do something else
}
would suffice.
If you're looking to trigger your logic the moment that input field changes, in the controller you could use the $watch directive, as Konpat Ta Preechakul suggested, or you could add an ng-change or ng-blur attribute to your input, and call a controller-side function:
<input pickadate ng-model="deadline" format="dd/mm/yyyy" placeholder="Select deadline" ng-change="selectedDate()"/>
and
$scope.selectedDate = function(){
if ($scope.deadline) {
// do something
} else {
// do something else
}
}
If you want conditional logic to occur directly in the view, bound real-time to values in the input field, then ng-if, ng-show, and ng-hide can be helpful:
<span ng-show="deadline">Show this if deadline has a value</span>
<span ng-hide="deadline">Don't show this if deadline has a value</span>
<span ng-if="!deadline">Don't render this into the DOM at all if deadline doesn't have a value</span>