I'm inspecting the DOM on an Angular application and seeing a simple link such as the following:
<button type="button" class="button mini text right clear-all" ng-show="draft.roster.slotsFilled" ng-click="draft.resetRoster()" really="Are you sure you want to clear all players from your team?">
I wanted to try to invoke the ng-click command here directly into the browser console by simply pasting draft.resetRoster(); Unfortunately I'm getting draft is not defined when trying to access it through the console. The link works perfectly fine itself though.
What's the best way to access/invoke the code that the ng-click attribute is referencing here?