Skip to content

Commit

Permalink
Merge pull request #1163 from adjohnson916/patch-1
Browse files Browse the repository at this point in the history
Fix typos on decorators-api.md.
  • Loading branch information
kpdecker committed Dec 24, 2015
2 parents 9a94d17 + ec64cf9 commit ee6fadf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/decorators-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Decorators allow for blocks to be annotated with metadata or wrapped in functionality prior to execution of the block. This may be used to communicate with the containing helper or to setup a particular state in the system prior to running the block.

Decorators are registered through similar methods as helpers, `registerDecorators` and `unregisterDecorators`. These can then be referenced via the friendly name in the template using the `{{* decorator}}` and `{{#* decorator}}{/decorator}}` syntaxes. These syntaxs are derivitives of the normal mustache syntax and as such have all of the same argument and whitespace behaviors.
Decorators are registered through similar methods as helpers, `registerDecorators` and `unregisterDecorators`. These can then be referenced via the friendly name in the template using the `{{* decorator}}` and `{{#* decorator}}{/decorator}}` syntaxes. These syntaxes are derivatives of the normal mustache syntax and as such have all of the same argument and whitespace behaviors.

Decorators are executed when the block program is instantiated and are passed `(program, props, container, context, data, blockParams, depths)`
Decorators are executed when the block program is instantiated and are passed `(program, props, container, context, data, blockParams, depths)`.

- `program`: The block to wrap
- `props`: Object used to set metadata on the final function. Any values set on this object will be set on the function, regardless of if the original function is replaced or not. Metadata should be applied using this object as values applied to `program` may be masked by subsequent decorators that may wrap `program`.
Expand Down

0 comments on commit ee6fadf

Please sign in to comment.