diff options
Diffstat (limited to 'docs/content/guide/module.ngdoc')
| -rw-r--r-- | docs/content/guide/module.ngdoc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/content/guide/module.ngdoc b/docs/content/guide/module.ngdoc index 12ec8917..e3b3362f 100644 --- a/docs/content/guide/module.ngdoc +++ b/docs/content/guide/module.ngdoc @@ -19,7 +19,7 @@ approach: # The Basics -Ok i am in a hurry how do i get a Hello World module working? +Ok, I'm in a hurry how do i get a Hello World module working? Important things to notice: @@ -116,7 +116,7 @@ The above is only a suggestion, so feel free to tailor it to your needs. # Module Loading & Dependencies -A module is a collection of configuration and run block which get applied to the application +A module is a collection of configuration and run blocks which get applied to the application during the bootstrap process. In its simplest form the module consist of collection of two kinds of blocks: @@ -173,8 +173,8 @@ to it are constant definitions, which are placed at the beginning of all configu Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been -configured and the injector has been created. Run blocks typically contain code which is hard -to unit-test, and for this reason should be declared in isolated modules, so that they can be +configured and the injector has been created. Run blocks typically contain code which is hard +to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests. ## Dependencies @@ -223,19 +223,19 @@ In all of these examples we are going to assume this module definition: Let's write some tests: <pre> describe('myApp', function() { - // load the application relevant modules then load a special - // test module which overrides the $window with mock version, - // so that calling window.alert() will not block the test + // load the application relevant modules then load a special + // test module which overrides the $window with mock version, + // so that calling window.alert() will not block the test // runner with a real alert box. This is an example of overriding // configuration information in tests. beforeEach(module('greetMod', function($provide) { - $provide.value('$window', { - alert: jasmine.createSpy('alert') + $provide.value('$window', { + alert: jasmine.createSpy('alert') }); }); // The inject() will create the injector and inject the greet and - // $window into the tests. The test need not concern itself with + // $window into the tests. The test need not concern itself with // wiring of the application, only with testing it. it('should alert on $window', inject(function(greet, $window) { greet('World'); |
