Better Error Messages Prettier New Lint Rules and Fixers <LinkTo> Now Works In Integration Tests Route Transition Debug Utilities ember-cli-update Inspector Collapsible Sidebar Better Component Inspector Test Harness QOL Improvements Template Lint TODOs Template Recast Whitespace Preservation New Polyfills and Codemods Website and Blog Redesign ember new !"lang {{page-title}} @ember!# ES Modules Unbundled ember-source RouterService#refresh()
Better Error Messages Prettier New Lint Rules and Fixers <LinkTo> Now Works In Integration Tests Route Transition Debug Utilities ember-cli-update Inspector Collapsible Sidebar Better Component Inspector Test Harness QOL Improvements Template Lint TODOs Template Recast Whitespace Preservation New Polyfills and Codemods Website and Blog Redesign ember new !"lang {{page-title}} @ember!# ES Modules Unbundled ember-source RouterService#refresh()
Better Error Messages Prettier New Lint Rules and Fixers <LinkTo> Now Works In Integration Tests Route Transition Debug Utilities ember-cli-update Inspector Collapsible Sidebar Better Component Inspector Test Harness QOL Improvements Template Lint TODOs Template Recast Whitespace Preservation New Polyfills and Codemods Website and Blog Redesign ember new !"lang {{page-title}} @ember!# ES Modules Unbundled ember-source RouterService#refresh()
Better Error Messages Prettier New Lint Rules and Fixers <LinkTo> Now Works In Integration Tests Route Transition Debug Utilities ember-cli-update Inspector Collapsible Sidebar Better Component Inspector Test Harness QOL Improvements Template Lint TODOs Template Recast Whitespace Preservation New Polyfills and Codemods Website and Blog Redesign ember new !"lang {{page-title}} @ember!# ES Modules Unbundled ember-source RouterService#refresh()
Better Error Messages Prettier New Lint Rules and Fixers <LinkTo> Now Works In Integration Tests Route Transition Debug Utilities ember-cli-update Inspector Collapsible Sidebar Better Component Inspector Test Harness QOL Improvements Template Lint TODOs Template Recast Whitespace Preservation New Polyfills and Codemods Website and Blog Redesign ember new !"lang {{page-title}} @ember!# ES Modules Unbundled ember-source RouterService#refresh()
Better Error Messages Prettier New Lint Rules and Fixers <LinkTo> Now Works In Integration Tests Route Transition Debug Utilities ember-cli-update Inspector Collapsible Sidebar Better Component Inspector Test Harness QOL Improvements Template Lint TODOs Template Recast Whitespace Preservation New Polyfills and Codemods Website and Blog Redesign ember new !"lang {{page-title}} @ember!# ES Modules Unbundled ember-source RouterService#refresh()
Arguments Implicit Injections Old Browser Support Policy Implicit this Property Lookup {{attrs.*}} Packager Experiment Legacy classNameBindings Template Syntax Classic Edition Optional Features Old Manager Capabilities hasBlock and hasBlockParams Magic Variables Array Observers Ember.Component Features On Built-In Components Transition Methods On Routes and Controllers {{loc}} Ember Global
vacation?</p> <!-- TODO: implement drop down component --> app/templates/index.hbs Choose a destination... Destination Where would be the perfect destination for your virtual vacation? Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
vacation?</p> <!-- TODO: implement drop down component --> app/templates/index.hbs <div class="drop-down" ...attributes> <button type="button" id="{{this.id}}-button" aria-haspopup="listbox" aria-expanded={{if this.expanded "true" "false"}} {{on "click" this.toggle}}> {{@label}} </button> {{#if this.expanded}} <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </li> {{/each}} </ul> {{/if}} </div> app/components/drop-down.hbs Choose a destination... Destination Where would be the perfect destination for your virtual vacation? Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island <DropDown @label="Choose a destination..." @items={{this.places}} />
vacation?</p> <DropDown @label="Choose a destination..." @items={{this.places}} /> app/templates/index.hbs <div class="drop-down" ...attributes> <button type="button" id="{{this.id}}-button" aria-haspopup="listbox" aria-expanded={{if this.expanded "true" "false"}} {{on "click" this.toggle}}> {{@label}} </button> {{#if this.expanded}} <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </li> {{/each}} </ul> {{/if}} </div> app/components/drop-down.hbs Choose a destination... Destination Where would be the perfect destination for your virtual vacation? Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
vacation?</p> <DropDown @label="Choose a destination..." @items={{this.places}} /> app/templates/index.hbs <div class="drop-down" ...attributes> <button type="button" id="{{this.id}}-button" aria-haspopup="listbox" aria-expanded={{if this.expanded "true" "false"}} {{on "click" this.toggle}}> {{@label}} </button> {{#if this.expanded}} <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </li> {{/each}} </ul> {{/if}} </div> app/components/drop-down.hbs Choose a destination... Destination Where would be the perfect destination for your virtual vacation? Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
vacation?</p> <DropDown @label="Choose a destination..." @items={{this.places}} /> app/templates/index.hbs <div class="drop-down" ...attributes> <button type="button" id="{{this.id}}-button" aria-haspopup="listbox" aria-expanded={{if this.expanded "true" "false"}} {{on "click" this.toggle}}> {{@label}} </button> {{#if this.expanded}} <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </li> {{/each}} </ul> {{/if}} </div> app/components/drop-down.hbs Choose a destination... Destination Where would be the perfect destination for your virtual vacation? Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
vacation?</p> <DropDown @label="Choose a destination..." @items={{this.places}} as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <button type="button" id="{{this.id}}-button" aria-haspopup="listbox" aria-expanded={{if this.expanded "true" "false"}} {{on "click" this.toggle}}> {{@label}} </button> {{#if this.expanded}} <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> app/components/drop-down.hbs Choose a destination... Destination Where would be the perfect destination for your virtual vacation? Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island </li> {{/each}} </ul> {{/if}} </div> {{yield item}}
vacation?</p> <DropDown @label="Choose a destination..." @items={{this.places}} as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <button type="button" id="{{this.id}}-button" aria-haspopup="listbox" aria-expanded={{if this.expanded "true" "false"}} {{on "click" this.toggle}}> {{@label}} </button> {{#if this.expanded}} <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> {{yield item}} </li> {{/each}} </ul> {{/if}} </div> app/components/drop-down.hbs Choose a destination... Destination Where would be the perfect destination for your virtual vacation? Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
vacation?</p> <DropDown @label="Choose a destination..." @items={{this.places}} as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <!-- Omitted: same markup for button as before --> {{#if this.expanded}} <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> {{yield item}} </li> {{/each}} </ul> {{/if}} </div> app/components/drop-down.hbs Choose a destination... Sorry, we are sold out. Join our mailing list to be notified of new tours! Destination Where would be the perfect destination for your virtual vacation?
vacation?</p> <DropDown @label="Choose a destination..." @items={{this.places}} as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <!-- Omitted: same markup for button as before --> {{#if this.expanded}} <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> {{yield item}} </li> {{else}} <li> <h3>Sorry, we are sold out.</h3> <a href="...">Join our mailing list</a> to be notified of new tours! </li> {{/each}} </ul> {{/if}} </div> app/components/drop-down.hbs Choose a destination... Sorry, we are sold out. Join our mailing list to be notified of new tours! Destination Where would be the perfect destination for your virtual vacation?
vacation?</p> <DropDown @label="Choose a destination..." @items={{this.places}} as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <!-- Omitted: same markup for button as before --> {{#if this.expanded}} <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> {{yield item}} </li> {{else}} <li> <h3>Sorry, we are sold out.</h3> <a href="...">Join our mailing list</a> to be notified of new tours! </li> {{/each}} </ul> {{/if}} </div> app/components/drop-down.hbs Destination Where would be the perfect destination for your virtual vacation? Choose a destination... Too much free time? Become a virtual tour guide and share your passion with the world! Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
@label="Choose a destination..." @items={{this.places}} as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <!-- Omitted: same markup for button as before --> {{#if this.expanded}} <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> {{yield item}} </li> {{/each}} </ul> {{/if}} </div> app/components/drop-down.hbs Destination Where would be the perfect destination for your virtual vacation? Choose a destination... Too much free time? Become a virtual tour guide and share your passion with the world! Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
@label="Choose a destination..." @items={{this.places}}> <:banner> <h3>Too much free time?</h3> Become a virtual tour guide and share your passion with the world! </:banner> <:item as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </:item> <:empty> <h3>Sorry, we are sold out.</h3> <a href="...">Join our mailing list</a> to be notified of new tours! </:empty> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <!-- Omitted: same markup for button as before --> {{#if this.expanded}} <div class="banner">{{yield to="banner"}}</div> <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> {{yield item to="item"}} </li> {{else}} <li>{{yield to="empty"}}</li> {{/each}} </ul> {{/if}} app/components/drop-down.hbs Destination Where would be the perfect destination for your virtual vacation? Choose a destination... Too much free time? Become a virtual tour guide and share your passion with the world! Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
@label="Choose a destination..." @items={{this.places}}> <:banner> <h3>Too much free time?</h3> Become a virtual tour guide and share your passion with the world! </:banner> <:item as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </:item> <:empty> <h3>Sorry, we are sold out.</h3> <a href="...">Join our mailing list</a> to be notified of new tours! </:empty> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <!-- Omitted: same markup for button as before --> {{#if this.expanded}} <div class="banner">{{yield to="banner"}}</div> <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> {{yield item to="item"}} </li> {{else}} <li>{{yield to="empty"}}</li> {{/each}} </ul> {{/if}} app/components/drop-down.hbs Destination Where would be the perfect destination for your virtual vacation? Choose a destination... Too much free time? Become a virtual tour guide and share your passion with the world! Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
@label="Choose a destination..." @items={{this.places}}> <:banner> <h3>Too much free time?</h3> Become a virtual tour guide and share your passion with the world! </:banner> <:item as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </:item> <:empty> <h3>Sorry, we are sold out.</h3> <a href="...">Join our mailing list</a> to be notified of new tours! </:empty> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <!-- Omitted: same markup for button as before --> {{#if this.expanded}} <div class="banner">{{yield to="banner"}}</div> <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> {{yield item to="item"}} </li> {{else}} <li>{{yield to="empty"}}</li> {{/each}} </ul> {{/if}} app/components/drop-down.hbs Destination Where would be the perfect destination for your virtual vacation? Choose a destination... Too much free time? Become a virtual tour guide and share your passion with the world! Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
@label="Choose a destination..." @items={{this.places}}> <:banner> <h3>Too much free time?</h3> Become a virtual tour guide and share your passion with the world! </:banner> <:item as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </:item> <:empty> <h3>Sorry, we are sold out.</h3> <a href="...">Join our mailing list</a> to be notified of new tours! </:empty> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <!-- Omitted: same markup for button as before --> {{#if this.expanded}} <div class="banner">{{yield to="banner"}}</div> <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> {{yield item to="item"}} </li> {{else}} <li>{{yield to="empty"}}</li> {{/each}} </ul> {{/if}} app/components/drop-down.hbs Destination Where would be the perfect destination for your virtual vacation? Choose a destination... Too much free time? Become a virtual tour guide and share your passion with the world! Sorry, we are sold out. Join our mailing list to be notified of new tours!
@label="Choose a destination..." @items={{this.places}}> <:banner> <h3>Too much free time?</h3> Become a virtual tour guide and share your passion with the world! </:banner> <:item as |item|> <img src={{item.image}} alt="" width="80" height="80"> <h3>{{item.name}}</h3> <p>{{item.description}}</p> </:item> <:empty> <h3>Sorry, we are sold out.</h3> <a href="...">Join our mailing list</a> to be notified of new tours! </:empty> </DropDown> app/templates/index.hbs <div class="drop-down" ...attributes> <!-- Omitted: same markup for button as before --> {{#if this.expanded}} <div class="banner">{{yield to="banner"}}</div> <ul role="listbox" aria-labelledby="{{this.id}}-button" tabindex="-1"> {{#each @items as |item|}} <li role="option" {{on "click" (fn this.select item)}}> {{yield item to="item"}} </li> {{else}} <li>{{yield to="empty"}}</li> {{/each}} </ul> {{/if}} app/components/drop-down.hbs Destination Where would be the perfect destination for your virtual vacation? Choose a destination... Too much free time? Become a virtual tour guide and share your passion with the world! Yufuin Scenic Japanese Onsen Town Paris Capital of France O‘ahu Third Largest Hawaiian Island
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> <f.TextArea @label="Bio" @field="bio" /> <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> <f.Submit /> </MyForm> app/templates/index.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> <f.TextArea @label="Bio" @field="bio" /> <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> <f.Submit /> </MyForm> app/templates/index.hbs <form {{on "submit" this.onSubmit}}> {{yield (hash Input=(component "my-form/input" form=this) TextArea=(component "my-form/text-area" form=this) Combo=(component "my-form/combo" form=this) Submit=(component "my-form/submit" form=this) ) }} </form> app/components/my-form.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> <f.TextArea @label="Bio" @field="bio" /> <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> <f.Submit /> </MyForm> app/templates/index.hbs <form {{on "submit" this.onSubmit}}> {{yield (hash Input=(component "my-form/input" form=this) TextArea=(component "my-form/text-area" form=this) Combo=(component "my-form/combo" form=this) Submit=(component "my-form/submit" form=this) ) }} </form> app/components/my-form.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> <f.TextArea @label="Bio" @field="bio" /> <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> <f.Submit /> </MyForm> app/templates/index.hbs <form {{on "submit" this.onSubmit}}> {{yield (hash Input=(component "my-form/input" form=this) TextArea=(component "my-form/text-area" form=this) Combo=(component "my-form/combo" form=this) Submit=(component "my-form/submit" form=this) ) }} </form> app/components/my-form.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> <f.TextArea @label="Bio" @field="bio" /> <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> <f.Submit /> </MyForm> app/templates/index.hbs <form {{on "submit" this.onSubmit}}> {{yield (hash Input=(component "my-form/input" form=this) TextArea=(component "my-form/text-area" form=this) Combo=(component "my-form/combo" form=this) Submit=(component "my-form/submit" form=this) ) }} </form> app/components/my-form.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> <f.TextArea @label="Bio" @field="bio" /> <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> <f.Submit /> </MyForm> app/templates/index.hbs <form {{on "submit" this.onSubmit}}> {{yield (hash Input=(component "my-form/input" form=this) TextArea=(component "my-form/text-area" form=this) Combo=(component "my-form/combo" form=this) Submit=(component "my-form/submit" form=this) ) }} </form> app/components/my-form.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> <f.TextArea @label="Bio" @field="bio" /> <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> <f.Submit /> </MyForm> app/templates/index.hbs <form {{on "submit" this.onSubmit}}> {{yield (hash Input=(component "my-form/input" form=this) TextArea=(component "my-form/text-area" form=this) Combo=(component "my-form/combo" form=this) Submit=(component "my-form/submit" form=this) ) }} </form> app/components/my-form.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> <f.TextArea <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> <f.Submit /> </MyForm> app/templates/index.hbs <form {{on "submit" this.onSubmit}}> {{yield (hash Input=(component "my-form/input" form=this) TextArea=(component "my-form/text-area" form=this) Combo=(component "my-form/combo" form=this) Submit=(component "my-form/submit" form=this) ) }} </form> app/components/my-form.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit @label="Bio" @field="bio" /> @form={{...}}
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> <f.TextArea <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> <f.Submit /> </MyForm> app/templates/index.hbs <form {{on "submit" this.onSubmit}}> {{yield (hash Input=(component "my-form/input" form=this) TextArea=(component "my-form/text-area" form=this) Combo=(component "my-form/combo" form=this) Submit=(component "my-form/submit" form=this) ) }} </form> app/components/my-form.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit @label="Bio" @field="bio" />
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as | < < < < </MyForm> app/templates/index.hbs <form {{on "submit" this.onSubmit}}> {{yield app/components/my-form.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit Input TextArea Combo Submit|> Input @label="Your Name" @field="name" /> TextArea @label="Bio" @field="bio" /> Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> Submit /> (component "my-form/input" form=this) (component "my-form/text-area" form=this) (component "my-form/combo" form=this) (component "my-form/submit" form=this) }} </form>
receive data from the component via block params. CONTEXTUAL COMPONENTS are called by the component consumer and can pass data to the component via arguments and blocks.
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> {{#if (f.isEmpty "name")}} <f.Error @field="name">Please provide your name.</f.Error> {{/if}} <f.TextArea @label="Bio" @field="bio" {{f.autoResize}} /> {{#if (f.hasMinLength "bio" 100)}} <f.Error @field="bio">Your bio is too short.</f.Error> {{else if (f.hasMaxLength "bio" 500)}} <f.Error @field="bio">Your bio is too long.</f.Error> {{/if}} <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> {{#if (f.hasMinLength "visited" 3)}} Wow, you visited a lot of countries! You will be a great tour guide! {{/if}} <f.Submit /> </MyForm> app/templates/index.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit Your bio is too short. Wow, you visited a lot of countries! You will be a great tour guide!
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> {{#if (f.isEmpty "name")}} <f.Error @field="name">Please provide your name.</f.Error> {{/if}} <f.TextArea @label="Bio" @field="bio" {{f.autoResize}} /> {{#if (f.hasMinLength "bio" 100)}} <f.Error @field="bio">Your bio is too short.</f.Error> {{else if (f.hasMaxLength "bio" 500)}} <f.Error @field="bio">Your bio is too long.</f.Error> {{/if}} <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> {{#if (f.hasMinLength "visited" 3)}} Wow, you visited a lot of countries! You will be a great tour guide! {{/if}} <f.Submit /> </MyForm> app/templates/index.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit Your bio is too short. Wow, you visited a lot of countries! You will be a great tour guide!
passion with the world!</p> <MyForm @onSubmit={{this.onSubmit}} as |f|> <f.Input @label="Your Name" @field="name" /> {{#if (f.isEmpty "name")}} <f.Error @field="name">Please provide your name.</f.Error> {{/if}} <f.TextArea @label="Bio" @field="bio" {{f.autoResize}} /> {{#if (f.hasMinLength "bio" 100)}} <f.Error @field="bio">Your bio is too short.</f.Error> {{else if (f.hasMaxLength "bio" 500)}} <f.Error @field="bio">Your bio is too long.</f.Error> {{/if}} <f.Combo @label="Countries Visited" @field="visited" @options={{this.countries}} /> {{#if (f.hasMinLength "visited" 3)}} Wow, you visited a lot of countries! You will be a great tour guide! {{/if}} <f.Submit /> </MyForm> app/templates/index.hbs Application Form Become a virtual tour guide and share your passion with the world! Tomster Your Name Bio Countries Visited France Japan United States Submit Your bio is too short. Wow, you visited a lot of countries! You will be a great tour guide!