crud
by dshilkret
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body ng-app="testApp">
<h2> Controllers Example</h2>
<div ng-controller="appController" class="col-md-8">
<form ng-submit= "{{student.id ? 'updateStudent(student)' : 'createStudent(student)' }}" novalidate>
<table border="0">
<tr class="form-group">
<td >Enter first name:</td>
<td><input class="form-control" type="text" id="firstName" ng-model="student.firstName"/>
</tr>
<tr class="form-group">
<td>Enter last name:</td>
<td><input type="text" class="form-control" id="lastName" ng-model="student.lastName"/>
</tr>
<tr class="form-group">
<td>Enter fees:</td>
<td><input type="text" class="form-control" id="fees" ng-model="student.fees"/>
</tr>
<tr class="form-group">
<td>Enter subject:</td>
<td><input type="text" class="form-control" id="subjectName" ng-model="student.subjectName"/>
</tr>
</table>
<br>
<button class="btn btn-success btn-sm" type="submit">{{student.id ? "Update" : "Add"}}</button>
<button class="btn btn-default btn-sm" type="reset">Reset</button>
</form>
<br>
<div >
<table class="table table-bordered table-stripped">
<thead>
<th>First Name</th>
<th>Last Name</th>
<th>Fees</th>
<th>Subject Name</th>
<th>Action</th>
</thead>
<tbody>
<tr...