Port of ng-attr-foo from angular-js