-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patholabs.html
83 lines (62 loc) · 2.21 KB
/
olabs.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="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
</head>
<body ng-app='app'>
<div ng-controller = 'LabsCtrl' class='container'>
<h1>Recent Posts</h1>
<form role='form'>
<div class = 'form-group'>
<div class = 'input-group'>
<h2>Name:</h2>
<textarea ng-model='labName' class='form-control'></textarea>
<h2>Description:</h2>
<textarea ng-model='labDescription' class='form-control'></textarea>
<h2>tumb:</h2>
<textarea ng-model='labTumb' class='form-control'></textarea>
<h2>Experiment structure:</h2>
<textarea ng-model='labStructure' class='form-control'></textarea>
<h2>Control and Measurement apparatus:</h2>
<textarea ng-model='labCaM' class='form-control'></textarea>
<h2>Math and physical background:</h2>
<textarea ng-model='labMaP' class='form-control'></textarea>
<h2>LabLinks:</h2>
<textarea ng-model='labLinks' class='form-control'></textarea>
<h2>Guide:</h2>
<textarea ng-model='labGuide' class='form-control'></textarea>
<h2>Skeleton code:</h2>
<textarea ng-model='labSkeleton' class='form-control'></textarea>
<h2>Assignments:</h2>
<textarea ng-model='labAssign' class='form-control'></textarea>
</div>
</div>
</form>
<span class= 'input-group-btn'>
<button ng-click='addLab()' class='btn btn-default'>Add Post</button>
</span>
<ul class='list-group'>
<li ng-repeat= 'post in posts' class='list-group-item'>
<strong>@{{post.username}}</strong>
<span>{{post.body}}</span>
</li>
</div>
<script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.js'></script>
<script>
var app=angular.module('app', [])
app.controller('LabsCtrl', function ($scope, LabSvc){
$scope.addLab = function (){
if ($scope.labName){
LabSvc.create({
name: $scope.labName
}).sucess(function (labs){
})
}
}
LabSvc.fetch().success(function (labs) {
$scope.labs = labs
})
})
})
</script>