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: AngularJS
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: AngularJS
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: AngularJS
01-Jun-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: AngularJS
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: AngularJS
30-Mar-2015

Technology

Explicitly providing ng-model to DOM elements

In AngularJS, we can easily write our own custom directives to achieve required functionality. There are certain attributes which we provide in directive definition like restrict , scope , template, link, transclude etc. There is one more attribute named : require , which gives us the liberty to include another directive and inject...

by Sakshi Tyagi
Tag: AngularJS
28-Jul-2014

Technology

Demystifying Transclusion

Wait, Trans .. what? Yes, Transclusion is the mysterious, big and most intimidating of words when writing AngularJS Components. AngularJS, being so powerful and all provides a lot of ways to do many things. Now writing directives is not a very complex exercise, infact it is quite simple now if you first have a look at the...

by Manoj Nama
Tag: AngularJS
13-Jul-2014

Node.js

Easy app scaffolding with Yeoman

Ever wondered that the most time consuming tasks are the one you have done numerous times on numerous projects, and why the hell am i doing it again? The most basic of examples of this is Scaffolding an app, you have to do a lot of things, repetitive things to get the app structure up to speed. This is an even bigger problem with...

by Manoj Nama
Tag: AngularJS
06-Jul-2014

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: AngularJS
30-Jun-2014

Node.js

Service in AngularJS

When we are working on MVC (or MVVM for AngularJS) Design-Patterns, our application is loosely coupled because of different independent components defined for e.g. Controller, View, Services, Modal/Data etc. All the components have their own work/role but today we will discuss only Services. Services are that part of application where...

by Amit Kumar
Tag: AngularJS
29-Jun-2014

Technology

Common functionality among Multiple Controllers

Many a times, we see a requirement, where we have to write same functions in multiple controllers just to share a common functionality among them, which is a bad approach, because in future, if any changes are required to that function, we’ll have to make the changes manually in all the copies of that function where it is defined or if...

by Amit Kumar
Tag: AngularJS
02-May-2014

Node.js

Angular Routes

As we all of know that AngularJS is very popular and powerful front-end framework, which helps us to build rich UI/UX applications. AngularJS has many cool things/features, but today we will concentrate on routes only and will try to make a small single page application like Facebook/Gmail with the help of routes, where we will perform...

by Amit Kumar
Tag: AngularJS
01-May-2014