Thanks to visit codestin.com
Credit goes to bennadel.github.io

Sanity Check: $index vs. DOM In AngularJS Directives