-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddress.html
50 lines (45 loc) · 1.96 KB
/
address.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
<form name="myForm">
<div class="control-group" ng-class="{error: myForm.name.$invalid && !myForm.name.$pristine}">
<label>Name</label>
<input type="text" name="name" ng-model="project.name" required>
<span ng-show="myForm.name.$error.required && !myForm.name.$pristine" class="help-inline">
Required {{myForm.name.$pristine}}</span>
</div>
<div class="control-group" ng-class="{error: myForm.site.$invalid && !myForm.site.$pristine}">
<label>email</label>
<input type="email" name="site" ng-model="project.site" required>
<span ng-show="myForm.site.$error.required && !myForm.site.$pristine" class="help-inline">
Required</span>
<span ng-show="myForm.site.$error.email" class="help-inline">
Not a valid email</span>
</div>
<div class="control-group">
<label>phone</label>
<input type="text" name="phone" ng-model="project.num" required ng-maxlength="10" ng-minlength="7">
<span ng-show="myForm.num.$error.required && !myForm.num.$pristine" class="help-inline">
Required</span>
<span ng-show="myForm.phone.$error.phone" class="help-inline">
Not a valid phone</span>
</div>
<label>Description</label>
<textarea name="description" ng-model="project.description"></textarea>
<br>
<a href="#/" class="btn">Cancel</a>
<button ng-click="save(project)" ng-disabled="myForm.$invalid" class="btn btn-primary">Save</button>
<button ng-click="destroy()" ng-show="project.$remove" class="btn btn-danger">Delete</button>
</form>
<div ng-app="project" ng-controller="DeliverCtrl" ng-show="list.length">
<div ng-repeat="c in list">
<div class="col-sm-6 col-md-4 col-lg-3">
<div class="panel panel-default" ng-click="edit(contact.id)">
Name:
<div class="panel-heading">{{ c.name }}</div>
<div class="panel-body">
Email: {{ c.email }}<br/>
Phone: {{c.num}}
<br/>Desc: {{ c.description }}
</div>
</div>
</div>
</div>
</div>