hasBlockParamspublic
Returns true when the component was invoked with a block parameter supplied.
Example (hasBlockParams will be false):
{{! templates/application.hbs }}
{{#foo-bar}}
No block parameter.
{{/foo-bar}}
{{! templates/components/foo-bar.hbs }}
{{#if hasBlockParams}}
This will not be printed, because no block was provided
{{yield this}}
{{/if}}
Example (hasBlockParams will be true):
{{! templates/application.hbs }}
{{#foo-bar as |foo|}}
Hi!
{{/foo-bar}}
{{! templates/components/foo-bar.hbs }}
{{#if hasBlockParams}}
This will be printed because a block was provided
{{yield this}}
{{/if}}
Returns:
- Boolean
Please login to continue.