Skip to content

Commit

Permalink
corrected line numbers in codefile includes (dojo#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
vansimke authored and edhager committed Oct 26, 2017
1 parent d012346 commit 8088101
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ Now that we have the `ApplicationContext`, let's use it within our widgets. This

{% instruction 'Now, add the following after the `applicationContext` declaration.' %}

{% include_codefile 'demo/finished/biz-e-corp/src/main.ts' line:31 %}
{% include_codefile 'demo/finished/biz-e-corp/src/main.ts' lines:30,31 %}

The first statement creates a `registry` where the application context can be registered. The second statement registers the `ApplicationContext` instance with newly created registry. The registry provides a way to register a widget via a label, making it accessible to other parts of the application. You can learn more in the [registry tutorial](../comingsoon.html).

{% include_codefile 'demo/finished/biz-e-corp/src/main.ts' line:36 %}

We need to pass the `registry` to the `projector` via the `setProperties` method to ensure that it is available for all widget and container instances.

{% include_codefile 'demo/finished/biz-e-corp/src/main.ts' line:35 %}

Now that the `Injector` is defined and registered and the `registry` has been set in the `projector`, it is time to create the components that will use it. In the next section, we will create a non-visual widget called a `Container` that will allow state to be injected into the `WorkerForm` and `WorkerContainer` widgets.

{% section %}
Expand Down

0 comments on commit 8088101

Please sign in to comment.