You have global methods that the controller calls anyways. These methods should be defined inside the controllers either by using "this.functionName" or "$scope.functionName"; I prefer the former.