Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 1.1 KB

README.md

File metadata and controls

22 lines (19 loc) · 1.1 KB

learn-ember

repo with ember.js tutorials/examples

Steps

  • use yo ember tutorial, which includes:
    • pre-requisites & installation
    • creating a basic template
    • using handlebars-syntax + sass-bootstrap on basic template

Findings

  • other content can be inserted via the partial helper, provided we have an equivalent .hbs file, e.g. the navbar.hbs file in the "templates" folder, and the following snippet to insert the helper:
 {{partial 'navbar'}} 
  • new templates can be generated by either:
    • adding a new [template_name].hbs file in the "templates" folder, or
    • running the following CLI command: ember generate template [template_name]
  • links to components are added as follows:
    • with a default a tag: {{#link-to 'template-name'}}Text for route{{/link-to}}
    • with a custom tag: {{#link-to 'template-name' tagName='li'}}<a href=''>Text for route</a>{{/link-to}}
  • {{outlet}} will renders a template based on the route determined by the router. Based on the route the corresponding controller and view are used.