refactor(ng-a): simplify the code

Closes #702