Sorting objects/columns with multiple fields AngularJS using HTML template binding and javaScript

Sorting in the tabular data is very common task. If you are not using the ui-grid and using other component which doesn’t provide the inbuilt sorting feature, then you need to do some additional work for the sorting. Suppose, I have a HTML table and using the simple ng-repeat directive. I am showing the employees … Continue reading Sorting objects/columns with multiple fields AngularJS using HTML template binding and javaScript

Two-way Data Binding in Angular 2 and JavaScript/ES5 – Creating a simple login form

Angular 2 has the different syntax for two way binding. AngularJS 2 is not the updated version of the AngularJS 1. It is completely rewrite framework. AngularJS 1 allows to create a applcation in a MVC pattern which has controllers, views and services etc. AngularJS 2 is the component based, means the whole application is … Continue reading Two-way Data Binding in Angular 2 and JavaScript/ES5 – Creating a simple login form

AngularJs directive: Restrict user to enter value with only ‘N’ decimal places

Directive Name: aDecimals How to Use: Add the attribute: n-decimals=”n” where n is the number like 2,3… If you want to restrict user to 2 decimal points, write like this: evo-decimals=”2″ Source Code: The following code will restrict user to enter numeric value with decimal upto 4 place. Javascript code var app = angular.module(’plunker’, []); … Continue reading AngularJs directive: Restrict user to enter value with only ‘N’ decimal places

Event binding to dynamic/runtime html elements

There are lot of situation when you need to deal with runtime html elements. In this guide we will walkthrough for creating elements, registering events to elements, detaching events from elements and destroying elements from the html page. Creating elements if you are using JavaScript( not jQuery library) In an HTML document, the document object … Continue reading Event binding to dynamic/runtime html elements