File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
packages/@ember/-internals/glimmer Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 185185 This component is invoked with a block:
186186 ```handlebars
187187 {{#my-component}}
188- Hi Jenn !
188+ Hi Jen !
189189 {{/my-component}}
190190 ```
191191
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
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 */
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
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 */
You can’t perform that action at this time.
0 commit comments