Sunday, December 28, 2014

Modal dialog box and popups in Angular.js using ngDialog

If you are building an Angular.js application and wish to add a modal dialog box or a simple popup, then the ngDialog module provides an easy, simple solution. It provides two default css themes and we can also add our own custom themes. Let's see how to create a simple dialog box with ngDialog. For our example, we will have a base page with a button which when clicked will open a contact-us form...

Saturday, December 06, 2014

Lookahead in regular expressions

As I was solving a couple of problems in Checkio, I came across a new concept - lookaheads in regular expressions. At first, it was slightly confusing to understand how lookaheads are different from normal regular expressions. But they actually prove to be very useful in certain cases. Lookaheads are zero-length assertions as they do not consume characters in the string but only assert whether...