AngularJS Slip no 14 Solution

<html>
<head>
<script src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js">
</script>
</head>
<body>
<h2>AngularJS eTickect Application</h2>
<div ng-app = "mainApp" ng-controller = "eTickectController">
<table border = "1">
<tr>
<td>Enter name:</td>
<td ><input type = "text" ng-model ="name"></td>
</tr>
<tr>
<td>Enter Address : </td>
<td> <input type = "text" ng-model = "address"> </td>
</tr>
<tr>
<td>Enter Contact Number:</td>
<td><input type = "text" ng-model = "contact"></td>
</tr>
<tr>
<td>Enter Source : </td>
<td>
<select ng-model="source">
<option value=" ">
<option value="Pune">Pune
<option value="Mumbai">Mambai
<option value="Pimpri">Pimpri
</select>
</td>
</tr>
<tr>
<td>Enter Destination : </td>
<td>
<select ng-model="destination">
<option value=" ">
<option value="Pune">Pune
<option value="Mumbai">Mumbai
<option value="Pimpri">Pimpri
</select>
</td>
</tr>
<tr>
<td>Enter Journey Date : </td>
<td> <input type = "text" ng-model = "jDate"> </td>
</tr>
<tr>
<td>Enter of Pasenger Name 1 : </td>
<td> <input type = "text" ng-model = "p1"> </td>
</tr>
<tr>
<td>Enter of Pasenger Name 2 : </td>
<td> <input type = "text" ng-model = "p2"> </td>
</tr>
</table>
<table border = “2” align = “center”>
<tr>
<td colspan =”3” align = “center”><font size = “5” color = “red” > Indian Railway Conter</font></td>
</tr>
<tr>
<td>Name :{{name}}</td>
<td>Address : {{address}}</td>
<td>Contact : {{contact}}</td>
</tr>
<tr>
<td>Source : {{source}}</td>
<td>Destination : {{destination}}</td>
<td>Journey Date : {{jDate}}</td>
</tr>
<tr>
<td> Pasengers1 : </td>
<td><input type =”text” value = {{p1}}></td>
<td><input type =”radio” name = p >Male<input type= radio name
=p>FeMale</td>
</tr>
<tr>
<td> Pasengers2 : </td>
<td><input type =text value= {{p2}} ></td>
<td>
<input type =”radio” name = p>Male
<input type= “radio” name = p>FeMale</td>
</tr>
</table>
</div>
<script>
var mainApp =angular.module("mainApp", []);
mainApp.controller('eTickectController', function($scope) {
$scope.name = "Satish"
$scope.address = "Pimpri"
$scope.contact = "9028813474"
$scope.source = "Pune"
$scope.destination = "Bidar"
$scope.jDate = "10/10/2020"
});

</script>
</body>
</html>

No comments:

Post a Comment