Current Class Updated

ANGULAR JS EVENTS EXAMPLE

<html>
<head>
<script src="js/angular.js"></script>
</head>
<body>
<div ng-app="myEvent">
<div ng-controller="ngEvents">
<h1>NG EVENTS EXAMPLE</h1>
<center>

Blur : <input type="text" ng-model="one.fname" ng-blur="testBlur()">

<!------------------------------------------------->
<hr>
Copy example:<input type="text" ng-model="one.pdata" ng-copy="testCopy()">
<br>
Paste example:<input type="text" ng-model="one.lpdata">
<!-------------------------------------------------->
<style>
.small{height:100px; width:100px; border-radius:20px;background:red;}
.large{height:200px; width:200px; border-radius:30px;}
</style>
<hr color='red'>
<img class="small" id="img-responsive" src="one.jpg" ng-model="one.myimage" ng-dblclick="testImage()">
</center>
<!----------ng-focus------------>
<hr>
Ng-focus example: <input type="text" ng-focus="myFocus()">

<!----------ng-focus------------>
<hr>
Ng-keydown example:
<input type="text" ng-model="one.keydown" ng-keydown="myKeydown()">

<hr>
Ng-keypress example:
<input type="text" ng-model="one.keypress" ng-keypress="myKeyPress()">

<hr>
Ng-keyup example:
<input type="text" ng-model="one.keyup" ng-keyup="myKeyup()">
<hr>
<div class="small" ng-mousedown="mymousedown()">
sdff df df dfg dfg dg df dfg dfgdfggdf
</div>

<hr>
<div class="small" ng-mouseenter="mymouseenter()">
Touch your mouse to this block
</div>

<hr color='red'>

<select ng-model="abc" ng-change="test(abc)">
<option value="">Select state</option>
<option value="karnataka">kar</option>
<option value="karnataka2">kar2</option>
<option value="karnataka3">kar3</option>
<option value="karnataka4">kar4</option>
</select>

<p>You have selected : {{showdata}}</p>
<p ng-show="xyz=='karnataka'">this is karanataka</p>
<p ng-show="xyz=='karnataka2'">this is karanataka 2</p>
<p ng-show="xyz=='karnataka3'">this is karanataka 3</p>
<p ng-show="xyz=='karnataka4'">this is karanataka 4</p>

</div>
</div>
<script>
var obj = angular.module("myEvent", []);
obj.controller("ngEvents", function($scope){

$scope.one = {};
$scope.testBlur=function(){
if($scope.one.fname == "")
{
alert("Sorry Invalid");
}else{
alert($scope.one.fname);
}
}

$scope.testCopy=function(){
$scope.one.lpdata = $scope.one.pdata;
}

//ng-focus
$scope.myFocus=function()
{
alert("ok");
}
//keydown
$scope.myKeydown=function()
{
alert($scope.one.keydown);
}

//keypress
$scope.myKeyPress=function()
{
alert($scope.one.keypress);
}

//keypress
$scope.myKeyup=function()
{
alert($scope.one.keyup);
}

$scope.mymousedown=function()
{
alert("Hello your mouse is down");
}

$scope.mymouseenter=function()
{
alert("Sorry your mouse had touch me");
}

$scope.test = function(item){
$scope.showdata = item;
$scope.xyz = item;
}

});
</script>
</body>
</html>

event example

<html>
<head>
<script src="js/angular.js"></script>
</head>
<body>
<div ng-app="myEvent">
<div ng-controller="ngEvents">
<h1>NG EVENTS EXAMPLE</h1>
<center>
<button ng-click="getMyClick()">NG CLICK </button>
<p></p>
</center>
</div>
</div>
<script>
var obj = angular.module("myEvent", []);
obj.controller("ngEvents", function($scope){

$scope.getMyClick=function(){
alert("ok");
}

});
</script>
</body>
</html>

angularjs ng-click examples using $http services 2nd example

<html>
<head>
<script src="js/angular.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-beta.2/angular-sani...
</head>
<body>
<div ng-app="myFilter">
<div ng-controller="filterTest">
<center>
<button ng-click="showUserList()">User List</button>
<button ng-click="showCutomerList()">Customer List</button>
<button ng-click="showAboutUs()">About Us</button>
</center>
<hr>
<table align="center" bgcolor="skyblue" width="50%" cellspacing="10">
<tr bgcolor='red'>
<th>Name</th>
<th>Email</th>
<th>City</th>
<th>Address</th>
</tr>
<tr ng-repeat="row in customer">
<td> {{row.name}} </td>
<td> {{row.email}} </td>
<td> {{row.city}} </td>
<td> {{row.address}}</td>
</tr>
</table>
<br>
<table align="center" bgcolor="skyblue" width="50%" cellspacing="10">
<tr bgcolor='red'>
<th>Name</th>
<th>Age</th>
<th>Gender</th>
</tr>
<tr ng-repeat="user in alluser">
<td> {{user.name}} </td>
<td> {{user.age}} </td>
<td> {{user.gender}} </td>
</tr>
</table>
<p ng-bind-html="myabout"></p>
</div>
</div>

<script>
var obj = angular.module("myFilter", ['ngSanitize']);
obj.controller("filterTest", function($scope, $http){

//for sorting the column on click
$scope.showCutomerList = function() {
$http.get("customer.txt").then(function(response){
$scope.customer = response.data.records;
});
}

$scope.showUserList = function() {
$http.get("user.txt").then(function(response){
$scope.alluser = response.data.records;
});
}

$scope.showAboutUs = function() {
$http.get("about.html").then(function(response){
$scope.myabout = response.data;
});
}

});
</script>
</body>
</html>

angularjs ng-click examples using $http services

<html>
<head>
<script src="js/angular.js"></script>
</head>
<body>
<div ng-app="myFilter">
<div ng-controller="filterTest">
<center>
<button ng-click="showUserList()">User List</button>
<button ng-click="showCutomerList()">Customer List</button>
<button ng-click="showAboutUs()">About Us</button>
</center>
<hr>
<table align="center" bgcolor="skyblue" width="50%" cellspacing="10">
<tr bgcolor='red'>
<th>Name</th>
<th>Email</th>
<th>City</th>
<th>Address</th>
</tr>
<tr ng-repeat="row in customer">
<td> {{row.name}} </td>
<td> {{row.email}} </td>
<td> {{row.city}} </td>
<td> {{row.address}}</td>
</tr>
</table>

</div>
</div>

<script>
var obj = angular.module("myFilter", []);
obj.controller("filterTest", function($scope, $http){

//for sorting the column on click
$scope.showCutomerList = function() {
$http.get("customer.txt").then(function(response){
$scope.customer = response.data.records;
});
}
});
</script>
</body>
</html>

Best Manual Testing Training With 100% Job Support (Training By 8 Years Experienced Professional)

Best Manual Testing Training Institute In Bangalore Marathahalli & BTM

Manual Testing Main Topic Covered

Fundamentals of Testing
Testing throughout the software life cycle
Static Techniques
Test Design Techniques
Test Management
Other Testing Types
Introducing Quality Center
Specifying Releases and Cycles & Planning Tests
Planning Tests and Running Tests,Adding and Tracking Defects

Subscribe to INFOCAMPUS RSS

100% Placement Program

JOB Assurance: Our Placement Officer will send for Interviews till you Get Placed
Interview Q & A provided which are frequently asked in Companies
Real Case Studies/Examples provided to clear Interviews Easily
Practical Knowledge Training on Every Topic

Student Free Benefits

We Provide Live Projects for you to Practice
Free Job Assistance and Certification
Free Technical Support even after getting job
Backup Classes for missing topics
Lab Facility , Wifi, Led TV Projector Career Counselling
Mock Exams and Mock Interviews Conducted

Courses Duration

45 - 50 Hours of Thoery and Pratical Classes
Weekdays and Weekends Classes Available
Get In-Depth Practical Knowledge on each Topic with example
Pay Fees in Installments
Attend 4 Class Free
Classroom, Online & Corporate Training