Skip to content

Commit b179dfd

Browse files
habdelrakategengler
authored andcommitted
added param "name of the block" for the API document of has-block and has-block-params
(cherry picked from commit c39b050)
1 parent 84767f9 commit b179dfd

File tree

1 file changed

+13
-2
lines changed
  • packages/@ember/-internals/glimmer

1 file changed

+13
-2
lines changed

packages/@ember/-internals/glimmer/index.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
This component is invoked with a block:
186186
```handlebars
187187
{{#my-component}}
188-
Hi Jenn!
188+
Hi Jen!
189189
{{/my-component}}
190190
```
191191
@@ -194,6 +194,15 @@
194194
{{my-component}}
195195
```
196196
197+
Using angle bracket invocation, this looks like:
198+
```html
199+
<MyComponent>Hi Jen!</MyComponent> {{! with a block}}
200+
```
201+
202+
```html
203+
<MyComponent/> {{! without a block}}
204+
```
205+
197206
This is useful when you want to create a component that can optionally take a block
198207
and then render a default template when it is not invoked with a block.
199208
@@ -207,6 +216,7 @@
207216
208217
@method hasBlock
209218
@for Ember.Templates.helpers
219+
@param {String} the name of the block. The name (at the moment) is either "main" or "inverse" (though only curly components support inverse)
210220
@return {Boolean} `true` if the component was invoked with a block
211221
@public
212222
*/
@@ -217,7 +227,7 @@
217227
This component is invoked with block params:
218228
```handlebars
219229
{{#my-component as |favoriteFlavor|}}
220-
Hi Jenn!
230+
Hi Jen!
221231
{{/my-component}}
222232
```
223233
@@ -243,6 +253,7 @@
243253
244254
@method hasBlockParams
245255
@for Ember.Templates.helpers
256+
@param {String} the name of the block. The name (at the moment) is either "main" or "inverse" (though only curly components support inverse)
246257
@return {Boolean} `true` if the component was invoked with block params
247258
@public
248259
*/

0 commit comments

Comments
 (0)