Dependency Injection with Angularjs

Ebook Details


Alex Knol

Year 2013
Pages 78
Publisher Packt Publishing
Language en
ISBN 9781782166566
File Size 2.53 MB
File Format PDF , EPUB
Download Counter 2,056

Ebook Description

Dependency injection facilitates better testing by allowing us to mock dependencies in testing environments so that we only test one thing at a time. It also enables us to write more maintainable code by decoupling our objects from their implementations. The motivation for using it in AngularJS is to make it easier to transparently load mocked objects in tests.