forked from angular/material
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
38 lines (33 loc) · 1.04 KB
/
script.js
File metadata and controls
38 lines (33 loc) · 1.04 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
angular
.module('menuDemoBasic', ['ngMaterial'])
.config(function($mdIconProvider) {
$mdIconProvider
.iconSet("call", 'img/icons/sets/communication-icons.svg', 24)
.iconSet("social", 'img/icons/sets/social-icons.svg', 24);
})
.controller('BasicDemoCtrl', function DemoCtrl($mdDialog) {
var originatorEv;
this.openMenu = function($mdOpenMenu, ev) {
originatorEv = ev;
$mdOpenMenu(ev);
};
this.notificationsEnabled = true;
this.toggleNotifications = function() {
this.notificationsEnabled = !this.notificationsEnabled;
};
this.redial = function() {
$mdDialog.show(
$mdDialog.alert()
.targetEvent(originatorEv)
.clickOutsideToClose(true)
.parent('body')
.title('Suddenly, a redial')
.textContent('You just called a friend; who told you the most amazing story. Have a cookie!')
.ok('That was easy')
);
originatorEv = null;
};
this.checkVoicemail = function() {
// This never happens.
};
});