fixed console errors either through creative use of ng-attr, or fixing errors in the javascript.