switched to binding with 'ng-attr-'. It fixed about half the errors.