-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathangular.js
More file actions
55 lines (44 loc) · 1.45 KB
/
angular.js
File metadata and controls
55 lines (44 loc) · 1.45 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*JS for input fields*/
var app = angular.module("myModule",["ngMaterial"]);
app.controller("myController",function(){
});
/*DropDown JS*/
angular.module('myModule', ['ngMaterial'])
.controller('AppCtrl', function($scope) {
});
/*Button*/
/*main Grid JS*/
angular
.module('myModule', ['ngMaterial'])
.controller('AppCtrl', function ($scope, $timeout, $mdSidenav, $log) {
$scope.toggleLeft = buildToggler('left');
$scope.toggleRight = buildToggler('right');
/**
* Build handler to open/close a SideNav; when animation finishes
* report completion in console
*/
function buildToggler(navID) {
return function() {
return $mdSidenav(navID).toggle()
.then(function () {
$log.debug("toggle " + navID + " is done");
});
}
}
})
.controller('LeftCtrl', function ($scope, $timeout, $mdSidenav, $log) {
$scope.close = function () {
$mdSidenav('left').close()
.then(function () {
$log.debug("close LEFT is done");
});
};
})
.controller('RightCtrl', function ($scope, $timeout, $mdSidenav, $log) {
$scope.close = function () {
$mdSidenav('right').close()
.then(function () {
$log.debug("close RIGHT is done");
});
};
});