-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
33 lines (29 loc) · 912 Bytes
/
Copy pathapp.js
File metadata and controls
33 lines (29 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var date_app = angular.module('date_app', [
//Application dependencies
'ngDateSelect'
])
// Examples of how to use DateSelect in multiple controllers
.controller("FirstController",function($scope){
// Register a function to get the date from the directive
$scope.setDateFn = function(dateFn) {
$scope.getDate = dateFn;
};
// Call the registered function to get dates
$scope.setDate = function(){
$scope.firstDate = $scope.getDate();
}
$scope.setSecondDateFn = function(dateFn) {
$scope.getSecondDate = dateFn;
};
$scope.setSecondDate = function(){
$scope.secondDate = $scope.getSecondDate();
}
})
.controller("SecondController",function($scope){
$scope.setThirdDateFn = function(dateFn) {
$scope.getThirdDate = dateFn;
};
$scope.setThirdDate = function(){
$scope.thirdDate = $scope.getThirdDate();
}
});