-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
51 lines (38 loc) · 1.36 KB
/
index.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
<!DOCTYPE html>
<html ng-app="app">
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<script type="text/javascript" src="ngModalService.js"></script>
<link rel="stylesheet" type="text/css" href="ngModalService.css" >
<meta charset="utf-8">
<title>ngModalService</title>
</head>
<body ng-controller="TestController">
</body>
<script type="text/javascript">
var app = angular.module("app",["ngModalServiceModule"])
app.controller("TestController",function($scope, ngModalService){
ngModalService({
title:"Welcome!",
template:"<p>Hello! My name is {{contact.name}}. You can write me at {{contact.twitter}}</p>",
controller:ContactController,
getView:function(view){
$(view.find("button").get(1)).text("Thanks but not :'(")
$(view.find("button").get(2)).text("Write me!");
}
});
})
function ContactController($scope){
$scope.contact = {name:"Einer Santana", twitter: "@einersantanar"};
$scope.modal.acceptPressed = function(){
alert("Alright! Lets continue!");
$scope.modal.destroy();
};
$scope.modal.cancelPressed = function(){
alert("So sad you're leaving :(... See you soon!");
$scope.modal.destroy();
};
}
</script>
</html>