AngularJS_Slip_Solutions
AngularJS_Slip_Solutions
html
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script>
var app = angular.module("myApp", []);
app.controller('userCtrl', ['$scope', function ($scope) {
$scope.showGames = function () {
$scope.games = [
{ GameName: 'Cricket', PlayerName: 'sachin', GameType: 'outdoor' },
{ GameName: 'Chess', PlayerName: 'V.Anand', GameType: 'Indoor' },
{ GameName: 'Tennis', PlayerName: 'Pet Sampras', GameType: 'outdoor' }];
}
}]);
</script>
</head>
<body ng-app="myApp" ng-controller="userCtrl">
<form>
<div ng-app="myApp" ng-init="Text='Displaying Games array Elements!'">
<p ng-bind="Text"></p>
</div>
<div ng-controller="userCtrl">
<div ng-repeat='game in games'>
{{game.GameName}}
{{game.PlayerName}}
{{game.GameType}}
</div>
</div>
<input type="button" ng-click="showGames()" value="Click Here"> </button>
</form>
</body>
</html>
Program2.html
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script>
var app = angular.module("myApp", []);
app.controller('userCtrl', ['$scope', function ($scope) {
$scope.showCourses = function () {
$scope.ugcourse = [
{ id: 'i', courseName: 'BBA(CA)' },
{ id: 'ii', courseName: 'BCA(Science' },
{ id: 'iii', courseName: 'B.Sc(Computer Science' },
];
$scope.pgcourses = [
{ id: 'i', courseName: 'M.Sc(Computer Science' },
{ id: 'ii', courseName: 'M.Sc.(CA)' },
{ id: 'iii', courseName: 'MCA' },
];
}
}]);
</script>
</head>
</body>
</html>
program3.html
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js">
</script>
</tr>
</thead>
<tr ng-repeat="x in StudDetails">
<td> {{x.rollno}} </td>
<td> {{x.name}} </td>
<td> {{x.class}} </td>
<td> {{x.city}} </td>
</tr>
</table>
</body>
<script>
var app = angular.module('myApp', []);
app.controller(
'StudController', function ($scope) {
$scope.StudDetails = [{
rollno: 1,
name: 'suresh sinde',
class: 'fybba ca',
city: 'pune',
}, {
rollno: 2,
name: 'ramesh more',
class: 'fybba ca',
city: 'mumbai',
}, {
rollno: 3,
name: 'rajesh jadhav',
class: 'sybba ca',
city: 'nashik',
}, {
rollno: 4,
name: 'amol dubey',
class: 'sybba ca',
city: 'nagpur',
}, {
rollno: 5,
name: 'sanjeev mishra',
class: 'tybba ca',
city: 'kanpur',
},
{
rollno: 6,
name: 'rajeev mishra',
class: 'sybba ca',
city: 'lucknow',
},
{
rollno: 7,
name: 'aniket bhosale',
class: 'fybba ca',
city: 'ahmednagar',
},
{
rollno: 8,
name: 'aniket chavan',
class: 'fybba ca',
city: 'ahmednagar',
},
{
rollno: 9,
name: 'abhay deshmukh',
class: 'fybba ca',
city: 'pune',
},
{
rollno: 10,
name: 'ajay deshmukh',
class: 'tybba ca',
city: 'pune',
}
];
});
</script>
</html>
program4.html
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js">
</script>
</tr>
</thead>
<tr ng-repeat="bank in BankDetails">
<td> {{bank.bankname}} </td>
<td> {{bank.micr}} </td>
<td> {{bank.ifsc}} </td>
<td> {{bank.address}} </td>
</tr>
</table>
</body>
<script>
var app = angular.module('myApp', []);
app.controller(
'myController', function ($scope) {
$scope.BankDetails = [{
bankname: 'SBI',
micr: '123456789',
ifsc: 'SBIN001122',
address: 'pune',
}, {
bankname: 'HDFC Bank',
micr: '1122334455',
ifsc: 'HDFC001122',
address: 'mumbai',
}
];
});
</script>
</html>
program5.html
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js">
</script>
<br><br>
<h4>using ng-bind directive</h4>
<div ng-app="myApp" ng-controller="myController">
Number 1: <input type="number" ng-model="number3" ng-change="add()"/>
Number 2: <input type="number" ng-model="number4" ng-change="add()"/>
<b>Addition=:</b> <span ng-bind="result1"></span>
</div>
<br><br>
<div ng-app="myApp" ng-init="myButton=true">
<button ng-disabled="myButton">Click Me!</button>
<br /><br />
<input type="checkbox" ng-model="myButton"/>Button
<br /><br />
Disabled : {{ myButton }}
</div>
<div ng-app="myApp" ng-controller="myController">
<input type="button" value="Show Angular" ng-click="ShowHide()"/>
<br><br><div ng-show = "IsVisible">Angular</div>
</div>
</body>
<script>
var app = angular.module('myApp', []);
app.controller(
'myController', function ($scope) {
$scope.number3 = 1;
$scope.number4 = 1;
$scope.add = function () {
$scope.result1 = ($scope.number3 + $scope.number4);
}
$scope.IsVisible = false;
$scope.ShowHide = function(){
$scope.IsVisible = true;
}
});
</script>
</html>
program6.html
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.js"></script>
<body ng-app="myApp">
<p>SYBBA CA SYLLABUS CBCS 2019 PATTERN"</p>
<script>
var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/", {
templateUrl : "home.html"
})
.when("/dm", {
templateUrl : "digitalmarketing.html"
})
.when("/ds", {
templateUrl : "datastructure.html"
})
.when("/se", {
templateUrl : "softwareengg.html"
})
.when("/angular", {
templateUrl : "angular.html"
})
.when("/php", {
templateUrl : "php.html"
})
.when("/bigdata", {
templateUrl : "bigdata.html"
})
.when("/blockchain", {
templateUrl : "blockchain.html"
})
});
</script>
</body>
</html>
digitalmarketing.html
<!DOCTYPE html>
<html>
<body>
<p>
Unit1
E-Commerce<br>
1.1 Introduction
1.2 Understanding Internet Marketing
1.3 Search Engine Optimization
1.4 Search Engine Marketing
1.5 Email Marketing
1.6 Digital Display Marketing
2. Introduction to New Age Media (Digital) Marketing<br>
2.1 What is Digital Marketing
2.2 Digital vs. Real Marketing
2.3 Digital Marketing Channels
2.4 Types of Digital Marketing(Overview)-Internet Marketing
,Social Media Marketing, Mobile Marketing
3. Creating Initial Digital Marketing Plan<br>
3.1 Content management
3.2 SWOT analysis: Strengths, Weaknesses, Opportunities, and
Threats
3.3 Target group analysis
EXERCISE: Define a target group
4. Marketing using Web Sites<br>
4.1 Web design
4.2 Optimization of Web sites
4.3 MS Expression Web
EXERCISE: Creating web sites, MS Expression
5. Search Engine Optimization<br>
5.1 SEO Optimization
5.2 Writing the SEO content
EXERCISE: Writing the SEO content
6. Customer Relationship Management<br>
6.1 Introduction to CRM
6.2 CRM platform
6.3 CRM models
7.Social Media Marketing<br>
7.1 Understanding Social Media Marketing
7.2 Social Networking (Facebook, Linkedin, Twitter, etc.)
Social Media (Blogging, Video Sharing - Youtube,
Photosharing – Instagram, Podcasts)
7.3 Web analytics - levels
7.4 Modes of Social Media Marketing-
7.4.1 Creating a Facebook page Visual identity of a
Facebook page , Types of publications, Facebook Ads ,
Creating Facebook Ads , Ads Visibility
7.4.2 Business opportunities and Instagram options
Optimization of Instagram profiles , Integrating
Instagram with a Web Site and other social networks,Keeping up with posts
7.4.3 Business tools on LinkedIn Creating campaigns on
LinkedIn , Analyzing visitation on LinkedIn
7.4.4 Creating business accounts on YouTube YouTube,Advertising , YouTube Analytics
7.4.5 E-mail marketing E-mail marketing plan , E-mail marketing campaign analysis , Keeping up
with
conversions
7.5 Digital Marketing tools: Google Ads, FaceBook Ads, Google Analytic, Zapier, Google Keyword
Planner
EXERCISE: Social Media Marketing plan.
EXERCISE: Making a Facebook page and Google Ads
8.Digital Marketing Budgeting<br>
8.1 Resource planning
8.2 Cost estimating
8.3 Cost budgeting
8.4 Cost control
</p>
</body>
</html>
Program8.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Angular JS Forms</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
<script>document.write('<base href="' + document.location + '" />');</script>
</head>
<body ng-controller="studentController">
<tr>
<td>Enter last name: </td>
<td><input name="lastname" type="text" ng-model="lastName" ng-pattern="/^[a-zA-Z]*$/"
required>
<span style="color:red" ng-show="studentForm.lastname.$dirty && studentForm.lastname.
$invalid">
<span ng-show="studentForm.lastname.$error.required">Last Name is required.</span>
</span>
</td>
</tr>
<tr>
<td>
Enter Age:
</td>
<td>
<input type="text" ng-model="age" name="age"
ng-pattern="/^(?:1[8-9]|[2-5][0-9]|50)$/" required/>
<span style="color:red" ng-show="studentForm.age.$dirty && studentForm.age.$invalid">
<span ng-show="studentForm.age.$error.required">age is required.</span>
<span style="color:red" ng-show="studentForm.age.$error.pattern">*Invalid Age. Valid
18-50</span>
</td>
</tr>
<tr>
<td>
<button ng-click="reset()">Reset</button>
</td>
<td>
<button ng-disabled="studentForm.firstname.$dirty &&
studentForm.firstname.$invalid || studentForm.lastname.$dirty &&
studentForm.lastname.$invalid||studentForm.age.$invalid && studentForm.age.$dirty" ng-
click="submit()">Submit</button>
</td>
</tr>
</table>
</form>
</div>
<div>
<input type="number" ng-model="value"><br>
<span>{{ value | greet}}</span>
</div>
<script>
var mainApp = angular.module("mainApp", []);
mainApp.controller('studentController', function ($scope) {
$scope.reset = function () {
$scope.firstName = "Suresh";
$scope.lastName = "Shinde";
}
$scope.reset();
});
mainApp.filter('greet', function() {
return function(input) {
if (input < 12) {
return 'Good Morning';
} else if (input >= 12 && input <= 17) {
return 'Good Afternoon';
} else if (input > 17 && input <= 24) {
return 'Good Evening';
} else {
return "I'm not sure what time it is!";
}
};
});
</script>
</body>
</html>
program9.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Employee Registration Form</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
</form>
<hr>
<div ng-switch="status">
<div ng-switch-when="+">
<h2>{{number1 + number2}} </h2>
</div>
<div ng-switch-when="-">
<h2>{{number1 - number2}} </h2>
</div>
<div ng-switch-when="*">
<h2> {{number1*number2}}</h2>
</div>
<div ng-switch-when="/">
<h2> {{number1/number2}}</h2>
</div>
</div>
</div>
</form>
</div>
<script>
var mainApp = angular.module("mainApp", []);
mainApp.controller('empController', function ($scope) {
$scope.reset = function () {
$scope.dob = "";
$scope.jdate = "";
$scope.salary = "";
}
$scope.reset();
});
</script>
</body>
</html>
program10.html
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.js"></script>
<body ng-app="myApp">
<center><h2>HOTELS IN PUNE</h2></center>
<script>
var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/", {
templateUrl : "home.html"
})
.when("/mariott", {
templateUrl : "marriott.html"
})
.when("/royalorchid", {
templateUrl : "royalorchid.html"
})
.when("/lemontree", {
templateUrl : "lemontree.html"
})
.when("/tcr", {
templateUrl : "tcr.html"
})
.when("/pride", {
templateUrl : "pride.html"
})
});
</script>
</body>
</html>
pride.html
<!DOCTYPE html>
<html>
<body>
<h1>Welcome to Pride Hotel</h1>
<p>Address:5, University Rd, Narveer Tanaji Wadi, Shivajinagar, Pune, Maharashtra 411005</p>
<p>Contact:020 66471741</p>
</body>
</html>
lemontree.html
<!DOCTYPE html>
<html>
<body>
<h1>Welcome to Lemon Tree Hotel</h1>
<p>Address: P4, Phase 1, Hinjewadi Rajiv Gandhi Infotech Park, Hinjawadi, Pune, Maharashtra
411057</p>
<p>Contact:020 4423 2323</p>
</body>
</html>
marriott.html
<!DOCTYPE html>
<html>
<body>
<h1>Welcome to JW Marriott Hotel</h1>
<p>Address: Senapati Bapat Rd,
Laxmi Society, Model Colony, Shivajinagar, Pune, Maharashtra 411053</p>
<p>Contact:66833333</p>
</body>
</html>
royalorchid.html
<!DOCTYPE html>
<html>
<body>
<h1>Welcome to Royal Orchid Hotel</h1>
<p>Address: Marisoft Annexe, Kalyani Nagar, Pune, Maharashtra 411014</p>
<p>Contact:020 4000 3000</p>
</body>
</html>
program11.html
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<body ng-app="myApp">
<div class="container-fluid">
<center><h3>Historical places in india</h3></center>
</div>
<nav class="navbar bg-light">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#!aurangabad">Aurangabad</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#!pune">Pune</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#!agra">Agra</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#!jodhpur">Jodhpur</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#!hyderabad">Hyderabad</a>
</li>
</ul>
</nav>
<div ng-view></div>
<script>
var app = angular.module("myApp", ["ngRoute"]);
app.config(function ($routeProvider) {
$routeProvider
.when("/", {
templateUrl: "home.html"
})
.when("/aurangabad", {
templateUrl: "aurangabad.html"
})
.when("/pune", {
templateUrl: "pune.html"
})
.when("/agra", {
templateUrl: "agra.html"
})
.when("/jodhpur", {
templateUrl: "jodhpur.html"
})
.when("/hyderabad", {
templateUrl: "hyderabad.html"
})
});
</script>
</body>
</html>
aurangabad.html
<!DOCTYPE html>
<html>
<body>
<p>aurangabad page</p>
<img src = "ajanta.jpg"
alt = "Ajanta Elora Caves" />
</body>
</html>
pune.html
<!DOCTYPE html>
<html>
<body>
<img src = "pune.jpeg"
alt = "Pune City" />
<p>pune page</p>
</body>
</html>
agra.html
<!DOCTYPE html>
<html>
<body>
<p>agra page</p>
</body>
</html>
jodhpur.html
<!DOCTYPE html>
<html>
<body>
<p>jodhpur page</p>
</body>
</html>
hyderabad.html
<!DOCTYPE html>
<html>
<body>
<p>hyderabad page</p>
</body>
</html>
program12.html
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
<script>
var invoice = angular.module('invoice', []);
invoice.controller('InvoiceController', function($scope){
$scope.invoice = {
items: [{
name: '',
contactno: '',
gender: '',
favorite:'',
}]
};
$scope.total = function(){
var total = 0;
angular.forEach($scope.invoice.items, function(item){
total += item.qty * item.price;
})
return total;
}
});
</script>
</head>
</html>
<div ng-app="invoice">
<h1>Customer Invoice Example</h1>
</section>
<section class="row" ng-controller="InvoiceController">
<table>
<thead>
<tr>
<th>Name</th>
<th>contactno</th>
<th>gender</th>
<th>Item</th>
<th>Quantity</th>
<th>Price</th>
<th>Total Amount</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in invoice.items">
<td><input type="text" ng-model="item.name" /></td>
<td><input type="number" ng-model="item.contactno"/></td>
<td><input type="text" ng-model="item.gender" /></td>
<td><select ng-model="item.favorite" id="mySelect">
<option>Tshirt</option>
<option>Jeans</option>
<option>Watch</option>
<option>Shoes</option>
</select></td>
<td><input type="number" name="price" ng-model="item.price"></td>
<td><input type="number" ng-model="item.qty" /></td>
<td>{{item.qty * item.price}} Rs</td>
<td></td>
<td>Amout to be Paid : </td>
<td>{{total()}} Rs</td>
</tr>
</tbody>
</table>
</section>
</div>
program13.html
<html>
<head>
<meta charset="UTF-8">
<title>Students Marksheet Program</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
</body>
</html>
program14.html
<html>
<head>
<meta charset="UTF-8">
<title>Students Marksheet Program</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
<body ng-app="mainApp" ng-controller="custController">
<h2>Customer Information for Plain Booking</h2>
<div>
<form name="form1">
<table border="1">
<tr>
<td>Enter name of Customer</td>
<td><input type="text" name="custname" ng-model="custname"></td>
</tr>
<tr>
<td>Enter address of Customer </td>
<td>
<input type="text" name="custaddr" ng-model="custaddr">
</td>
</tr>
<tr>
<td>Enter Contact No </td>
<td><input type="number" name="custcontact" ng-model="custcontact"> </td>
</tr>
<tr>
<td>Enter Gender </td>
<td> <input type="text" name="custgender" ng-model="custgender"></td>
</tr>
<tr>
<td>Enter Date of Booking</td>
<td> <input type="date" name="custdob" ng-model="custdob"></td>
</tr>
<tr>
<td>Enter Date of Journey</td>
<td> <input type="date" name="custdoj" ng-model="custdoj"></td>
</tr>
<tr>
<td>Enter No.of Passenger</td>
<td> <input type="number" name="custpass" ng-model="custpass"></td>
</tr>
<tr>
<td> <input type="button" value="Display Result" ng-click="isShowHide('show')">
</td>
</tr>
</table>
</form>
</div>
<div ng-show="showval">
<br><br>
<h3> eTicket of Passenger for Plain</h3><br><br>
<form name="form2" controller="custController">
<table border="2">
<thead>
<td>name</td>
<td>address</td>
<td>contactno</td>
<td>gender</td>
<td>Date of Booking</td>
<td>Date of Journey</td>
<td>No. of passengers</td>
</thead>
<tr>
<td>{{custname}}</td>
<td>{{custaddr}}</td>
<td>{{custcontact}}</td>
<td>{{custgender}}</td>
<td>{{custdob}}</td>
<td>{{custdoj}}</td>
<td>{{custpass}}</td>
</tr>
</table>
</form>
</div>
<script>
var mainApp = angular.module("mainApp", []);
}
}
});
</script>
</body>
</html>
program15.html
<html>
<head>
<meta charset="UTF-8">
<title>Students Marksheet Program</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
<table border="1">
<tr>
<td>Enter the Name of Passenger</td>
<td><input type="text" name="name1" ng-model="bus.name"></td>
</tr>
<tr>
<td>Enter your Address </td>
<td>
<input type="text" name="baddress" ng-model="bus.address">
</td>
</tr>
<tr>
<td>Enter Contact No </td>
<td><input type="text" name="bcontactno" ng-model="bus.contactno"> </td>
</tr>
<tr>
<td>Enter Source Station</td>
<td><select name="source" ng-model="bus.source">
<option>Pune</option>
<option>Mumbai</option>
<option>Nashik</option>
<option>Kolhapur</option>
</select></td>
</tr>
<tr>
<td>Enter Destination Station</td>
<td><select name="dest" ng-model="bus.dest1">
<option>Pune</option>
<option>Mumbai</option>
<option>Nashik</option>
<option>Kolhapur</option>
</select></td>
</tr>
<tr>
<td>Enter Date of booking</td>
<td> <input type="date" name="dob" ng-model="bus.dob"></td>
</tr>
<tr>
<td>Enter Date of journey</td>
<td> <input type="date" name="doj" ng-model="bus.doj"></td>
</tr>
<tr>
<td>Enter No of Passengers</td>
<td> <input type="number" name="noofpass" ng-model="bus.noofpass"></td>
</tr>
<tr>
<td> <input type="button" value="Display eTicket" ng-click="isShow('show')">
</td>
</tr>
</table>
</div>
<div ng-show="showval">
<br><br>
e-Ticket of Person<br><br>
<table border="2">
<thead>
<td>
name
</td>
<td>address</td>
<td>contactno</td>
<td>source</td>
<td>destination</td>
<td>date of booking</td>
<td>date of journey</td>
<td>number of Passengers</td>
</thead>
<tr>
<td>{{bus.name}}</td>
<td>{{bus.address}}</td>
<td>{{bus.contactno}}</td>
<td>{{bus.source}}</td>
<td>{{bus.dest1}}</td>
<td>{{bus.dob}}</td>
<td>{{bus.doj}}</td>
<td>{{bus.noofpass}}</td>
</tr>
</table>
</div>
<script>
var mainApp = angular.module("mainApp", []);
if (param == "show") {
$scope.showval = true;
}
}
});
</script>
</body>
</html>
program16.html
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script>
var app = angular.module("myApp", []);
app.controller('studCtrl', ['$scope', function ($scope) {
$scope.showStudent = function () {
$scope.stud = [
{ name: 'suresh', city: 'pune' },
{ name: 'ramesh', city: 'pune' },
{ name: 'rajesh', city: 'mumbai' },
{ name: 'sachin', city: 'mumbai' },
];
}
}]);
</script>
</head>
</div>
</div>
<input type="button" ng-click="showStudent()" value="Click Here"> </button>
</form>
</body>
</html>
program17.html
<html>
<head>
<meta charset="UTF-8">
<title>Searching name in Angularjs</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
<td>{{a.name}}</td>
</tr>
</table>
</div>
</div>
<script>
var mainApp = angular.module("mainApp", []);
$scope.users = [{
});
</script>
</body>
</html>
program18.html
<!doctype html>
<html ng-app="myApp">
<head>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.js"></script>
</head>
<body>
<h1>welcome to our College Department</h1>
<br><br>
<div class="row">
<div class="col">
<ul>
<li> <a href="#!Staff1">Staff1</a></li>
<li> <a href="#!Staff2">Staff2</a></li>
<li> <a href="#!Staff3">Staff3</a></li>
<li><a href="#!Staff4">Staff4</a></li>
</ul>
</div>
<div ng-view></div>
<div class="col">
<script>
var app = angular.module("myApp", ["ngRoute"]);
app.config(function ($routeProvider) {
$routeProvider
.when("/Staff1", {
templateUrl: "Staff1.html"
})
.when("/Staff2", {
templateUrl: "Staff2.html"
})
.when("/Staff3", {
templateUrl: "Staff3.html"
})
.when("/Staff4", {
templateUrl: "Staff4.html"
})
});
</script>
</div>
</div>
</body>
</html>
Staff1.html
<!DOCTYPE html>
<body>
<img src = "faculty.jpeg"
alt = "Faculty Image" />
<p>welcome to staff1 web page</p>
</body>
</html>
Staff2.html
<!DOCTYPE html>
<body>
<img src = "faculty.jpeg"
alt = "Faculty Image" />
<p>welcome to staff2 web page</p>
</body>
</html>
program19.html
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
<script>
var app = angular.module("myApp", []);
app.controller('empCtrl', ['$scope', function ($scope) {
$scope.showEmployee = function () {
$scope.emp = [
{ name: 'suresh', city: 'pune',salary:'5000' },
{ name: 'ramesh', city: 'pune',salary:'6000' },
{ name: 'rajesh', city: 'mumbai',salary:'7000' },
{ name: 'sachin', city: 'mumbai',salary:'8000'},
];
}
}]);
</script>
</head>
</div>
<br>
<br>
<br>
<br>
</div>
<input type="button" ng-click="showEmployee()" value="Click Here"> </button>
</form>
</body>
</html>
program20.html
<html>
<head>
<meta charset="UTF-8">
<title>Angular JS Validation Program</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
</td>
</tr>
<tr>
<td>Enter your MobileNo </td>
<td><input type="number" name="mobile" ng-model="mobile" ng-pattern="/^[7-9][0-9]{9}$/" ng-
minlength="10" ng-maxlength="10"
required></td>
<td> <span ng-show="personform.mobile.$error.required">Phone number is required</span>
<span ng-show=" personform.mobile.$error.pattern"> Valid phone number is required</span>
</td>
</tr>
<tr>
<td>Enter Pin Code</td>
<td><input type="number" name="pincode" ng-model="pincode" ng-pattern="/^[0-5]{6}$/" ng-
minlength="6" ng-maxlength="6" required> </td>
<td> <span ng-show="personform.pincode.$error.required">pin code is required</span>
<span ng-show="personform.pincode.$error.pattern">Valid pin code is required</span>
</td>
</tr>
<tr>
<td>Enter Email ID</td>
<td> <input type="email" name="email" ng-model="email" ng-maxlength="100" required></td>
<td><span style="color:red" ng-show="personform.email.$dirty && personform.email.
$invalid"></span>
<span ng-show="personform.email.$error.required">Email is required.</span>
<span ng-show="personform.email.$error.email">Invalid email address.</span>
</td>
</tr>
<tr>
<td> <input type="button" value="Display Person Info" ng-click="isShow('show')">
</td>
</tr>
</table>
</form>
</div>
<div ng-show="showval">
<br><br>
Information of Person<br><br>
<table border="2">
<thead>
<td>name</td>
<td>Mobile</td>
<td>Pincode</td>
<td>Email</td>
</thead>
<tr>
<td>{{name1}}</td>
<td>{{mobile}}</td>
<td>{{pincode}}</td>
<td>{{email}}</td>
</tr>
</table>
</div>
<script>
var mainApp = angular.module("mainApp", []);
if (param == "show") {
$scope.showval = true;
}
}
});
</script>
</body>
</html>
program21.html
<html>
<head>
<meta charset="UTF-8">
<title>Students Marksheet Program</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
<table border="1">
<tr>
<td>Enter the Doctor Number</td>
<td><input type="number" name="docno" ng-model="docno"></td>
</tr>
<tr>
<td>Enter the Doctor Name </td>
<td>
<input type="text" name="docname" ng-model="docname">
</td>
</tr>
<tr>
<td>Enter the Doctor Address </td>
<td><input type="text" name="docaddress" ng-model="docaddress"> </td>
</tr>
<tr>
<td>Enter Phone Number</td>
<td> <input type="number" name="phone" ng-model="phone"></td>
</tr>
<tr>
<td>Enter the Doctor Specialization</td>
<td> <input type="text" name="docspl" ng-model="docspl"></td>
</tr>
<tr>
<td> <input type="button" value="Doctor Details" ng-click="isShow('show')">
</td>
</tr>
</table>
</div>
<div ng-show="showval">
<br><br>
Doctor Details<br><br>
<table border="1">
<thead>
<td>Doctor No</td>
<td>Doctor Name</td>
<td>Doctor Address</td>
<td>Doctor Phone</td>
<td>Doctor Specialization</td>
</thead>
<tr>
<td>{{docname}}</td>
<td>{{docname}}</td>
<td>{{docaddress}}</td>
<td>{{phone}}</td>
<td>{{docspl}}</td>
</tr>
</table>
</div>
<script>
var mainApp = angular.module("mainApp", []);
if (param == "show") {
$scope.showval = true;
}
}
});
</script>
</body>
</html>
program22.html
<html>
<head>
<meta charset="UTF-8">
<title>Angular JS Validation Program</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
if (param == "show") {
$scope.showval = true;
}
}
});
</script>
</body>
</html>
program23.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
</form>
<script>
var mainApp = angular.module("myApp", []);
mainApp.controller('myController', function ($scope) {
$scope.save = function ($this) {
if ($this.loginform.name.$error.minlength) {
alert("Username is too short");
}
else if($this.loginform.pass1.$error.minlength)
{
alert("password should be eight chars");
}
else if($this.loginform.name.$valid && $this.loginform.pass1.$valid)
alert("valid credentials");
}
});
</script>
</body>
</html>
program24.html
<html>
<head>
<meta charset="UTF-8">
<title>Searching name in Angularjs</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
<body ng-app="mainApp" ng-controller="FilterController">
<div ng-controller="FilterController">
<div>
Enter the Search Keyword:
<input type="text" name="searchname" ng-model="searchname">
<div ng-hide="users"></div>
<table>
<tr ng-repeat="a in users | filter : searchname" ng-show="searchname">
<td>{{a.name}}</td>
</tr>
</table>
</div>
</div>
<script>
var mainApp = angular.module("mainApp", []);
$scope.users = [{
name: "Education",
}, {
name: "Sports",
}, {
name: "Bollywood",
}, {
name: "Politics",
}];
});
</script>
</body>
</html>
program25.html
<html>
<head>
<meta charset="UTF-8">
<title>Angular JS Validation Program</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
</head>
</html>
program26.html
<!doctype html>
<html ng-app="myApp">
<head>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.js"></script>
</head>
<body>
<nav class="navbar navbar-dark bg-primary">
<a class="navbar-brand" href="#">E Learning System</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText"
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#!/home">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#!/management">Management</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#!/staff">Staff</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#!/about">About Us</a>
</li>
</ul>
</div>
</nav>
<div ng-view></div>
<script>
var app = angular.module('myApp', ['ngRoute']);
app.config(function($routeProvider) {
$routeProvider
.when('/home', {
templateUrl : 'home.html',
})
.when('/management', {
templateUrl : 'management.html',
})
.when('/staff', {
templateUrl : 'staff.html',
})
.when('/about', {
templateUrl : 'about.html',
})
.otherwise({redirectTo: '/'});
});
app.controller('HomeController', function($scope) {
$scope.message = 'Hello Welcome to Home page';
});
</script>
</body>
</html>
home.html
<!DOCTYPE html>
<html>
<body>
<h1>welcome is Home page</p>
</body>
</html>
management.html
<!DOCTYPE html>
<html>
<body>
</body>
</html>
staff.html
<!DOCTYPE html>
<html>
<body>
<p>welcome to staff page</p>
</body>
</html>
about.html
<!DOCTYPE html>
<html>
<body>
<h1>this is abous us page</h1>
<p>For technical queries kindly contact following nos</p>
<br>
<p>9811223344,</p>
<p>[email protected]</p>
</body>
</html>