-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo-angular.html
37 lines (36 loc) · 1.32 KB
/
demo-angular.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
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="import" href="registration-form.html">
</head>
<body ng-controller="AppController">
<registration-form watch-form
firstname="{{ firstname }}"
lastname="{{ lastname }}"
email="{{ email }}"
password="{{ password }}"></registration-form>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.12/angular.min.js"></script>
<script>
var app = angular.module('app', []);
app.controller('AppController', function ($scope) {
$scope.firstname = 'Alexandr';
$scope.lastname = 'Evtushenko';
$scope.email = '[email protected]';
$scope.password = '123';
});
app.directive('watchForm', function() {
return {
restrict: 'A',
link: function(scope, element) {
element.bind('done', function(e) {
alert("Done!\n" + JSON.stringify(e.data.data));
});
}
};
});
</script>
</body>
</html>