refactor(ng-a): simplify the code