ember-learn / ember-learn/guides-source

Add an example on how to access controller in gjs/gts templates

Open
#2,183 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
161
Forks
512
Avg merge
4d 9h
Merged PRs (30d)
4

Description

It would be helpful to have here an example here: https://guides.emberjs.com/v6.9.0/routing/controllers/

HEre is the current exmaple with gjs valid code, could be added to the page or replaced
```gjs

{{@model.title}}


by {{@model.author}}


{{@model.intro}}


{{#if @controller.isExpanded}}
Hide Body


{{@model.body}}

{{else}}
Show Body
{{/if}}

```

Thanks in advance

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.