I am using the datepicker from bootstrap-UI for angular. I would like to toggle between two functions. now() and clear(). Is this possible inside Angular's ng-click?
http://plnkr.co/edit/aMcKwXOSQwgnGwfNN9yI?p=preview
The toggle has the ng-click="today()" I would like to add clear() to it, thanks.
Controller Code:
$scope.today = function() {
$scope.dt = new Date();
};
$scope.today();
$scope.clear = function () {
$scope.dt = null;
};
Edit - I saw this answer but I would like to explore all options.