Using ng-attr to avoid too many console errors