Introduction to Javascript Promises API

Javascript Promises API

A Promise is a value not necessarily known at the time of it’s creation. It mainly used in asynchronous actions resulting in success or failure. The Promises represents a value which may be available now, or in the future, or never. Promises new Promise(function(resolve, reject) { }).then(function() { }).catch(function() { }); then() and catch() are prototype methods and they can ben chained as shown above. A Promise will always be either “Pending” or “Fulfilled” or “Rejected”. Pending – Initial state, operation not

Continue Reading

Awesome Features of Google Chrome

Google Chrome

There are few hidden features in Google’s Chrome browsers which many of us are un-aware of. Here I have listed 4 of those hidden features that I’m aware of and can be very useful. Customise Search We know that we can select any search engine as our default search site on Omni bar(Address bar) of the Chrome. But only few are aware that we can use the Omni bar to open any page of the site just by entering a page name.

Continue Reading

Fully Customisable & Accessible HTML5 Video Player

HTML 5 Video Thumbnail

In modern browsers, with HTML5 Video Tag it is very easy and simple to include video in page. Unlike earlier we had to include Flash object and to support that we need to add Flash Player Plugin in browsers. Flash player was never bundled with Browsers so when we include flash object in our page we need to ask readers to install plugin first to see the video. HTML5 Video Video tag from HTML5 allows us to add Video on a page with

Continue Reading

AngularJS: Communicate Among Controllers

Communicate Between Controllers

Working with AngularJS has made things very easy for front-end developers. We can handle almost everything with Controllers. Parent-Child Controllers There are times when we needed to work with more then one controllers and we need to communicate between those controllers. It would be easy to communicate between controllers if they are in parent-child relation. Independent Controllers In case the controllers are independent and we need to pass information on an event of one controller to another. In this case we

Continue Reading

Creating Custom Directives in AngularJS

Communicate Between Controllers

Directives are markers on a DOM element (such as an attribute, element name, comment or CSS class) that tell AngularJS’s HTML compiler ($compile) to attach a specified behavior to that DOM element (e.g. via event listeners), or even to transform the DOM element and its children. – AngularJS.org In this blog, I will show how to create custom directives. To better understand concept of Directive please go through the AngularJS’s Custom Directive section. If you are new to AngularJS, please read

Continue Reading