AngularJS: Defining a method on the Scope