A Message Box Modal

Message box is widely used in each website. So I created a Message Box Modal using bootstrap and AngularJS for re-usability. I want the user to put such a single HTML to use the message box: <c-msgbox msgbox-show=”showNavMsgbox” msgbox-done=”doneNavMsgbox” msgbox-name=”navMsgbox”></c-msgbox> Here msgbox-show attribute is the name of msgbox showing event, msgbox-done attribute is the name of msgbox returning event, …

Read More

Asynchronous JavaScript – From ECMAScript 5 to ECMAScript 7

I found this interesting article several days ago. It reviews the development of asynchronous JavaScript. The title of the origin is : JavaScript Goes Asynchronous (and It’s Awesome). Reference: https://www.sitepoint.com/javascript-goes-asynchronous-awesome/ By David Catuhe This article is part of a web development series from Microsoft. JavaScript has come a long way since its early versions and thanks to all efforts done …

Read More

Asynchronous JavaScript – JS Timers

Reference:  http://www.cnblogs.com/sprying/archive/2013/05/26/3100639.html, http://ejohn.org/blog/how-javascript-timers-work/, http://www.laruence.com/2009/09/23/1089.html How JavaScript Timers Work In the previous posts we have talked a lot about asynchronous JS. Here in his post I want to have a deeper look into the JS engine, the event loop and find out how JS Timers work. At a fundamental level it’s important to understand the details behind …

Read More

Promises in AngularJS

Reference: https://segmentfault.com/a/1190000002788733 As has mentioned in the previous post, promise is a way that can handle asynchronous tasks.  promise is an object that represents the value or exception that a function may return. Please refer to Asynchronous JavaScript – Promises. Using Promise in AugularJS To use  promise in AngularJS, you need to use the built-in service: $q. We can use defer() method in $q to create …

Read More

Asynchronous JavaScript – Promises

Reference: http://www.ruanyifeng.com/blog/2012/12/asynchronous%EF%BC%BFjavascript.html, http://sporto.github.io/blog/2012/12/09/callbacks-listeners-promises/, https://segmentfault.com/a/1190000002788733 Overview Promises provide a well-defined interface for interacting with an object that represents the result of an action that is performed asynchronously, and may or may not be finished at any given point in time. By utilizing a standard interface, different components can return promises for asynchronous actions and consumers can utilize …

Read More