AngularJS, Front End Development

Immediate and non-immediate model updates in AngularJS

In AngularJS, immediate model updates is a default behavior but if we want to persist value in the object after a certain time period has elapsed then we can achieve the same by using "debounce" object in "ng-model-options" directive, which is known as "non-immediate model updates". Immediate Model updates [html] <div...

by Dhanendra Kumar
Tag: angular development
26-Jun-2015

AngularJS, Front End Development

Dependency Annotation in AngularJS

When a function of service or controller invoked via the injector then we have to annotate these functions so that the injector knows what service to inject into the function. In Angular, there are three ways of annotating code with service name - Inline Array Annotation $inject Property Annotation Implicit Annotation ...

by Dhanendra Kumar
Tag: angular development
15-Jun-2015

AngularJS, Front End Development

Register Service by Factory, $provide and Service function in AngularJS

In AngularJS, there are three ways to register a service in a module. Module's Factory Function Module's Config via $provide Module's Service Function Via Module's Factory Function We can register a service via Angular module’s "factory" function. This is commonly use to register a service. Registering service in...

by Dhanendra Kumar
Tag: angular development
08-Jun-2015

AngularJS, Front End Development

AngularJS Deferred & Promises- Basic Understanding

AngularJS Deferred & Promises- Basic Understanding Table of Contents 1. Introduction to Asynchronous AngularJs 2. Callbacks- Basic Understanding 3. Callback Hell 4. Promise- A Better way of handling callbacks 5. Promise In AngularJS- $q Service 6. Deferred API 7. Promise API 8. Some other promise based...

by Deepak Vishwakarma
Tag: angular development
04-Jun-2015

AngularJS, Front End Development

Scope Event propagation in AngularJS

Angular provides a very powerful means to transfer messages to scopes at different hierarchical level. We can dispatch an event upwards through the scope hierarchy by notifying all the registered "$rootScope.Scope" listeners in the hierarchy or downwards to all the child scopes. Angular provides these two functions to achieve the event...

by Dhanendra Kumar
Tag: angular development
01-Jun-2015

AngularJS, Front End Development

Angular’s $resource for CRUD Operations

$resouce is a perfect option to create a single page application which involve CRUD operations.You don't write your CRUD methods (create,read,update and delete) when you use it. A RESTful web service with one endpoint for a data type that does different things with that data type based on HTTP methods like GET, POST, PUT, DELETE,...

by Rubi Saini
Tag: angular development
30-May-2015

AngularJS

Directive Priority in AngularJS

Recently I discovered that every directive in AngularJS has a priority score assigned to it. While the page is loaded the priority plays a very important role in setting the order of the execution of various directives in single DOM Element. The priority is used to sort the directives before their "compile" function gets called. In simple...

by Gaurav Sharma
Tag: angular development
28-May-2015

Node.js

Configurable Service in AngularJS

Angular provide services for handling non-view logic, communication with server(back-end) and can holds data & state. These services are singleton objects that can be used to share and organize code. For doing so, angular provides us five cool ways to make a service on the bases of once need. Following are the five approaches that...

by Vibhor Kukreja
Tag: angular development
30-Mar-2015

Node.js

Form Validations using AngularJs

There are lots of ways to validate a web page like HTML5 validations, but why not do it in a better interactive way by using AngularJS. AngularJS provides us with several form properties for validation, which helps in providing instant feedback in case validation is violated.     $valid: return true when input field is valid.  ...

by Sandeep Kumar
Tag: angular development
19-Feb-2015

AngularJS, Front End Development

Minification safe Angular.js

Recently, I wanted to upgrade my Grails application to 2.4.3 and also switched from resource plugin to assets-pipeline plugin. As everything was going good in the development, so I pushed it to QA after which I was bombarded with JavaScript errors and missing providers. What has happened?? So here, Angular.js internal dependency...

by Brij Kishor
Tag: angular development
17-Feb-2015

Node.js

‘resolve’ property in angular

Now a days , angular ui-router is being used actively for maintaining routes in angular applications. In my current project, I came across a use case in which I had to perform certain checks before executing certain route mapping. For example lets consider the most basic situation in which we want to directly show dashboard route in case...

by Rubi Saini
Tag: angular development
22-Jan-2015

Node.js

Scope in AngularJS

When we work on AngularJS, scope become very important concept. So today we will understand the Scope in AngularJS. In almost every AngularJS Controller we use scope object which is auto injected by AngularJS in $scope named parameter. And that scope gets visible to marked HTML and its inner/child HTML, because of which HTML can access...

by Amit Kumar
Tag: angular development
30-Jun-2014