forked from 720kb/angular-tooltips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ng-material.html
83 lines (78 loc) · 3.64 KB
/
ng-material.html
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">
<link rel="stylesheet" type="text/css" href="https://gitcdn.xyz/repo/angular/bower-material/v0.11.4/angular-material.css">
<link rel="stylesheet" type="text/css" href="dist/angular-tooltips.css">
<style media="screen">
.dialogdemoBasicUsage #popupContainer {
position: relative;
}
.dialogdemoBasicUsage .debt-be-gone {
font-weight: bold;
color: blue;
text-decoration: underline;
}
.dialogdemoBasicUsage .footer {
width: 100%;
text-align: center;
margin-left: 20px;
}
.dialogdemoBasicUsage .footer, .dialogdemoBasicUsage .footer > code {
font-size: 0.8em;
margin-top: 50px;
}
</style>
<title>Angularjs Tooltips</title>
</head>
<body id="demo-container">
<div ng-controller="AppCtrl" class="md-padding dialogdemoBasicUsage" id="popupContainer" ng-cloak="" ng-app="MyApp">
<p class="inset" layout="row" layout-wrap="" layout-align="center center">
Open a dialog over the app's content. Press escape or click outside to close the dialog and send focus back to the triggering button.
</p>
<div class="dialog-demo-content" layout="row" layout-wrap="" layout-align="center center">
<span tooltips tooltip-template="Hello">
<md-button class="md-primary md-raised" ng-click="showAlert($event)" style="width: 150px">
Alert Dialog
</md-button>
</span>
</div>
<p class="footer">Note: The <b>Confirm</b> dialog does not use <code>$mdDialog.clickOutsideToClose(true)</code>.</p>
<div ng-if="status">
<br>
<b layout="row" layout-align="center center" class="md-padding">
{{status}}
</b>
</div>
</div>
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular-animate.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular-route.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular-aria.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular-messages.min.js"></script>
<script type="text/javascript" src="https://gitcdn.xyz/repo/angular/bower-material/v0.11.4/angular-material.js"></script>
<script type="text/javascript" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-114/assets-cache.js"></script>
<script type="text/javascript" src="dist/angular-tooltips.js"></script>
<script type="text/javascript">
var app = angular.module('MyApp', ['ngMaterial', '720kb.tooltips'])
.controller('AppCtrl', function($scope, $mdDialog) {
$scope.status = ' ';
$scope.showAlert = function(ev) {
// Appending dialog to document.body to cover sidenav in docs app
// Modal dialogs should fully cover application
// to prevent interaction outside of dialog
$mdDialog.show(
$mdDialog.alert()
.parent(angular.element(document.querySelector('#popupContainer')))
.clickOutsideToClose(true)
.title('This is an alert title')
.content('You can specify some description text in here.')
.ariaLabel('Alert Dialog Demo')
.ok('Got it!')
.targetEvent(ev)
);
};
})
</script>
</body>
</html>