# angular.scope.$become

Work in Progress This page is currently being revised. It might be incomplete or contain inaccuracies.
Deprecated API This method will be removed before 1.0

## Description

Modifies the scope to act like an instance of the given class by:

- copying the class's prototype methods
- applying the class's initialization function to the scope instance (without using the new operator)

That makes the scope be a `this` for the given class's methods â effectively an instance of the given class with additional (scope) stuff. A scope can later `$become` another class.

`$become` gets used to make the current scope act like an instance of a controller class. This allows for use of a controller class in two ways.

- as an ordinary JavaScript class for standalone testing, instantiated using the new operator, with no attached view.
- as a controller for an angular model stored in a scope, "instantiated" by `scope.$become(ControllerClass)`.

Either way, the controller's methods refer to the model variables like `this.name`. When stored in a scope, the model supports data binding. When bound to a view, {{name}} in the HTML template refers to the same variable.

## Usage

    angular.scope.$become();