I have a problem. I want to run a function but it can only be run when I'm 100% sure the required fields are filled.
ATM it just executes the function even tho the required fields are not filled.
<input id="ticket-title" uib-tooltip="Insert a title for the ticket"
class="ticket-title" name="title" type="text"
placeholder="Write a title for the ticket" ng-model="vm.ticket.TITLE" required>
<button type="submit" class="btn btn-default p1" ng-click="vm.createTicket()">
Submit <i class="glyphicon glyphicon-ok"></i>
</button>
Controller
vm.createTicket = function () {
// I need a way to check if the form/fields are filled.
};