Skip to main content

Posts

Showing posts from 2014

Table row data add and delete using angularjs

          Using angularjs will added list of item from the view into table. Angularjs using user name and department details added into table and unwanted or wrongly entered data was delete functionality implemented. HTML Code <div ng-app="appTable">     <div ng-controller="appController">         <input type="text" ng-model="user.name"/><br/>         <input type="text" ng-model="user.dept"/><br/>         <button ng-click="add()"> Add </button>                 <table>             <th>                 <td>S.No</td>                 <td>Name</td>                 <td>Dept</td>                 <td>Delete</td>             </th>             <tr ng-repeat="employee in employeeList">                 <td>{{$index}}</td>                   <td>{{employee.name}}&

How to create image Animation in angularjs

        We apply animation concept from angularjs, This example how to apply HTMl5 animation logic using angular directive to applied.        This animation are applied zooming image object in a interval of time then it will move into left side of screen.         Apply animation may need to stop or continue to run logic also applied. Example : Html <div ng-app="imageAnimation">     <div ng-controller="splashCtrl">             <div class="btn">             <input type="button" value="Run" ng-click="run()"/>             <input type="button" value="Stop" ng-click="stop()"/>             </div>       <img ng-src="{{url1}}" width="200" height="200" class="picbig" />             <img ng-src="{{url2}}" width="200" height="200" class="old"/>         <img n

$rootScope using AngularJS Example

$rootScope               A $rootScope angular directive is using to support a global accessing for variables and function in a module. Angular $rootScope is live of scope object from the module.             $rootScope declare any one controller it will allow to accessing all controller no any restriction for implement. Will include the $rootScope directive from the controller library loader time. Sample $rootScope Declaration  var app = angular.module('rootModule',[]); app.controller('firstController',['$scope','$rootScope',function($scope, $rootScope){     console.log('first');     }]); Program Example Html: <div ng-app="rootModule">     <div ng-controller="firstController">         Click count : {{count}}          <input type="button" value="click" ng-click="countCal()" />     </div>     <div ng-controller="se

How to use $watch in angularJS

$watch in angularJS            watch method is listening component, what your mention to $watch expression name. If your mention of ng-model, this model have any reaction happen from your ng-model like your declared text type this ng-model happen key press or key type means that time this $watch method take every single action from corresponding ng-model. This action take and do it your new functionality of every single action process.         $watch method main purpose to happen every single action made to logic needed to apply from that location. Like key up and down function logic validation apply logic from here.       Example for your need to apply not allow space bar from your email id field that logic problem is need to apply for $watch method. $watch(watchExpression, listener, [objectEquality]); watchExpression - This is for reference to ng-model name declaration  listener - Listener is make function when it action happen that time to trigger for

Radio Button Selection using AngularJS

How to use radio button in angularJS    Radio button selection is apply to angular ng-click event method, this method passing param is $event Object. This $event  Object have corresponding radio button properties will return.   Radio Button angular properties  ngModel string It's to angular refer the bind properties  value string To get value or set value from the radio button  name string Property name of the form radio button. ngChange string To make event from the radio button ngValue string Angular expression value  Radio Button Example : HTML: <div ng-app="radiobtn">     <div ng-controller="radioController">         Select your favourite food <br/>         <input type="radio" name="fav" ng-model="fav_food" value="curd rice" ng-click="getFood($event)" />curd rice<br/>             <input type="radio" name="fav" ng-

5 Million Gmail Usernames and Passwords Leaked online, Check Yours Now

Gmail accreditation leaked online?            Oh my God! Afresh I accept to change my password!! Yes, you heard right. Millions of Gmail annual accreditation (email abode and password) accept been baseborn and fabricated about accessible through an online forum, causing a ample bulk of users common to change their Gmail countersign again.          The website that appear the email addresses with analogous passwords is Russian. The accreditation assume to be old and acceptable sourced from assorted abstracts breaches. It is believed that the leaked passwords are not necessarily those acclimated to admission Gmail accounts, but assume to accept been aggregate from added websites area users acclimated their Gmail addresses to register. 5 Million gmail credentials leaked online            The annual bankrupt if a user acquaint a hotlink to the log-in accreditation on Reddit frequented by hackers, able and aspiring. But the annal book absolute about 5 actor Gmail addresse

Timer Display using AngularJS

Timer Display To display timer in a page means, we need to aware of angular directive as following $interval and $filter . Current time get from new Date() object from native java script.   $interval Directive:  A interval is wait into a millisecond or trigger to a function, This function many many time to repeatedly calling process is control to us.   Syntax:  $interval(fn, delay, [count], [invokeApply]); fn - a function to call repeatedly. Delay – number of millisecond to call a function. Count – Number of time to repeat.(0 value means no-repeat) invoteApply – set to false means it will skip. Example:  HTML: <div ng-app="timerApp">     <div ng-controller="timerController">         {{time}}     </div> </div> JAVAScript: var app = angular.module("timerApp", []); app.controller("timerController",['$scope','$interval','$filter', fu

Reported Apple iCloud Hack Leaked Hundreds of Nude Celebrity Photos

Now this gonna be the acme of Aloofness Breach! Nude images of several high-profile persona including actors, models, singers and presenters accept been fabricated accessible online in a arrant hacking aperture affiliated to the Apple iCloud service.        The contempo aloofness aperture appears to be one of the better celebrity aloofness breaches in history and represents a austere aperture and abuse of privacy. A hacker allegedly breached Apple iCloud annual and afflicted the claimed photos of at atomic 100 high-profile stars. WHO IS BEHIND IT The bearding hacker, application the name Tristan , sparked the aspersion on Sunday afterwards auctioning a ample accumulation of changeable celebrities' declared naked photographs assimilate the 4chan online forum, an online bulletin lath acclimated for administration pictures. The annual of those celebrities allegedly affected, whose nudes photographs are allegedly in this cache, is actual continued that includes Jenny M

How to use ng-bind in angularJS

User Typed text bind in a page using angularJS ?            ngBind in angular it will append the DOM element of another DOM attribute values to show ng-bind named attributes.         {{Expression}} no need of expression of angularJS data appending in DOM container. ng-bind attribute is enough to accessing scope of controller value in the DOM. Sample Declaration ng-bind :    <span ng-bind="bindName"></span> ng-bind Example :  html: <div ng-app="bindapp">     <div ng-controller="bindController">         <input type="text" ng-model="message" />             <p> Customer Message <span ng-bind="message"></span> </p>     </div>         </div> javascript: var app = angular.module("bindapp",[]); app.controller("bindController",['$scope',function($scope){     $scope.message = "HI THIS SAMPLE M

How to use ng-href directive in AngularJS

ng-Href Directive                  ng-Href directive is hyper link markup to a text in angularJs. This hyperlink will change able to implement dynamic url {{hash}} value. Hash value to assign in a controller to happened user click event fire to assign dynamic url. This Value is undefined means it will return to 404 page. ng-Href directive Example  HTML:      <div ng-app="anchor">     <div ng-controller="anchorController">         <a ng-href="http://www.google.com" ng-click="show($event)">Anchor Tag</a>     </div>   </div> Javascript :  var anch = angular.module('anchor', []); anch.controller('anchorController',['$scope', '$window', function($scope, $window){     $scope.show = function(obj) {       $window.open(obj.target.href);     } }]); Result :  Demo

How to use ngClick in angularJs

ngClick             What is ngClick ?                   An ngClick directive to allow a customer even handling functions. An html element make any click event logic is need to implement ng-click in DOM.  Syntax:      <input type ="anytype" ng-click="function_name()"> How to pass C urrent Object or E vent ? When we want get current clicked dom object properties is need means we pass $event  param to corresponding method.    <input type ="anytype" ng-click="function_name($event)"> Example : <div ng-app="appClick">     <div ng-controller="appController">         <input type="button" value="Click" ng-click="showClick()" />         <input type="button" name="buttonClick" value="click+Event" ng-click="showClickEvent($event)" />     </div> </div> Java Script: var appCl

How to use forEach in angularJS

forEach in angularJS           forEach is iterator of object collection convert to collection of array. An array into collection of iterator have two param value and key.  Value - a value of properties in a iterator collection. key   - properties of value  Syntax :        angular.forEach(obj, iterator, [context]) Example : <div ng-app="modeleach">     <div ng-controller="controllereach">         For each array value {{temp}}     </div> </div> JavaScript : var app = angular.module("modeleach",[]); app.controller("controllereach",['$scope',function($scope){     var techArray = {name:"rajesh", state:"tamilnadu", country:"india" };     var val = [];          angular.forEach(techArray, function(value, key) {         this.push(value);     }, val);     console.log("List of item ==> "+ val);     $scope.temp = val; }]);

How to use ng-Show in directive

How to use ng-Show in directive ?      An ng-Show directive is a block or session of DOM presenting or hide the functional ng-Show attribute value base. If ng-Show directive value have false means that DOM block is not appear, The directive value have true means That DOM block is appear.  Example HTML:            <div ng-app="ShowModule">     <div ng-controller="ShowContoller">         <div ng-show="flag" class="myStyle">             welcome to the India         </div>         <button ng-click="show()">Show</button>         <button ng-click="hide()">Hide</button>     </div> </div> Javascript : var app = angular.module("ShowModule",[]); app.controller("ShowContoller", function($scope){     $scope.flag = false;     $scope.show = function() {         $scope.flag = true;         }     $scope.hide =

How to array value or Array Object show in table using angularJS

How to array value or Array Object show in table using angularJS ?          An array object or array value view into  a template using ng-repeat directive. This directive will take key and value to presenting in a template. Sample array value :   $scope.rankList = [   {name:'John', age:25, gender:'boy', rankHolder:5},   {name:'Jessie', age:30, gender:'girl', rankHolder:4},   {name:'Johanna', age:28, gender:'girl', rankHolder:6},   {name:'Joy', age:15, gender:'girl', rankHolder:1},   {name:'Mary', age:28, gender:'girl', rankHolder:2},   {name:'Peter', age:95, gender:'boy', rankHolder:3}    ]; Example: <div ng-app="repeatModule">     <div ng-controller="repeatController">      <table border="1">          <tr>              <th>S.No</th>              <th>Name</th>              <th>Age</th&g

What is mean by Filer in angularJS

What is mean by Filter in AngularJS ?      A filter is presenting format of value. It's like Date, String, Currency, Number and etc. Filter where using two place                    1. Template                    2. Controller or Service or Factory List of Filter in angularjs :  1. currency - It will present into currency format(Like $2000.00 , 2300.040) 2. number - It will present into number a text 3. date - It converted to string format 4. uppercase - String converted to uppercase 5. lowercase - String converted to lowercase 6. json - javascript object converted into json object 7. orderBy - Starting array of listed data. 8. limitTo - Specific number of element will store in array Filter in Controller Example: <html> <head> <title> My First Example </title> </head> <body> <div ng-app="filterModule">     <div ng-controller="filterController">      {{Myname}}     </div> </d

How to create basic angularJS Example ?

 How to create basic angularJS Example ?     First create module it contains have service, factory, controller and more. Here ng-app name is my application module name. HTML <html> <head> <title> My First Example </title> </head> <body> <div ng-app="myFirstModule">     <div ng-controller="myFirstContoller">         {{name}}     </div> </div> </body> <html> JavaScript: <script type="text/javascript" src="js/angular.js"></script> <script type="text/javascript"> var app = angular.module("myFirstModule",[]); app.controller("myFirstContoller", function($scope){ $scope.name = "Welcome to angularJS"; }); </script> Demo: Demo URL

18 -year old student arrested for hacking school computers to change grades

18 -year old student arrested for hacking school computers to change grades An 18-year old Miami University apprentice is adverse accuse for allegedly breaching the school's computer arrangement to change grades for himself and four added students. Jose Bautista appeared afore a adjudicator Friday afterwards he was arrested Thursday by the Miami Academy Board Police afterwards the arch of Dr. Michael M. Krop Senior High Academy angry him in, afterwards the apprentice reportedly gave him a accounting confession. The arch claims he acquired a accounting acknowledgment from the student. "It's not fair to the humans that absolutely try," said Mayan Dehry, a apprentice at Bautista's school. "Like, I apperceive a lot of kids are in AP classes, and they try absolutely harder to get the grades that they get. I don't know, if you're just traveling to be apathetic and again change your grades, that's not what acquirements is about." A adol

Clock Counting Down on Windows XP Support

"If you were to acquisition a birthmark in Windows 8, again that birthmark apparently exists backwards to added Windows versions," agenda McAfee's Adam Wosotowsky. "People can attending at those patches and think, 'What were they patching? I bet this aforementioned botheration exists in XP, but it's not patched because they're no best patching it.' The aegis of an operating arrangement drops off a bluff if abutment ends." As Microsoft prepares to cut off abutment for Windows XP, hackers are cutting their knives in apprehension of abstraction up the operating system's carcass. Web predators will ambush on XP 10 account afterwards Microsoft pulls the abutment bung on the software, predicted one above aggressive computer specialist and arrangement engineer. Indeed, it appears that advice highwaymen are stockpiling armament for a alternation of assaults on the operating system. "There are a amount of zero-day explo