Book Image

AngularJS Web application development Cookbook

By : Matthew Frisbie
Book Image

AngularJS Web application development Cookbook

By: Matthew Frisbie

Overview of this book

Packed with easy-to-follow recipes, this practical guide will show you how to unleash the full might of the AngularJS framework. Skip straight to practical solutions and quick, functional answers to your problems without hand-holding or slogging through the basics. Avoid antipatterns and pitfalls, and squeeze the maximum amount out of the most powerful parts of the framework, from creating promise-driven applications to building an extensible event bus. Throughout, take advantage of a clear problem-solving approach that offers code samples and explanations of components you should be using in your production applications.
Table of Contents (17 chapters)
AngularJS Web Application Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 AngularJS...