Fixed error by calling 'warning' on ''. Should be 'warn'. Also changed angular.element.find(...) to document.getElementById(...) as AngularJS's jqLite does not support 'find'