Manipulating your application from the console
Being able to directly manipulate components of your application manually while testing is an extremely useful tool when debugging. It is often the case that framework abstractions that provide you with improved application organization will, at the same time, make it more difficult to inspect and manipulate application components at the console level. Breakpoint debugging is more than suitable for these purposes most of the time, but being able to easily inspect and manipulate services, scopes, and other AngularJS components at the console level can be extremely useful.
How to do it…
The angular object is exposed in the global browser namespace, and access to the application internals will need to be routed through there. Scopes and services can be manipulated as shown in the following sections:
Scopes
Inspecting and manipulating scopes throughout your application will likely be one of the most common use cases when interacting with an...