Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remoteData and RemoteData do net work directly in template-only components #486

Closed
NullVoxPopuli opened this issue May 19, 2022 · 1 comment · Fixed by #490
Closed

remoteData and RemoteData do net work directly in template-only components #486

NullVoxPopuli opened this issue May 19, 2022 · 1 comment · Fixed by #490
Labels
bug Something isn't working

Comments

@NullVoxPopuli
Copy link
Owner

NullVoxPopuli commented May 19, 2022

example:

  {{#let (RemoteData (concat "https://swapi.dev/api/people/" @id)) as |person|}}
    {{#if person.isLoading}}
      ... loading ...
    {{else if person.isError}}
      {{person.error}}
    {{else if person.isResolved}}
      {{person.value.name}} 
    {{/if}}
  {{/let}}
@NullVoxPopuli NullVoxPopuli added the bug Something isn't working label May 19, 2022
@NullVoxPopuli
Copy link
Owner Author

NullVoxPopuli commented May 19, 2022

the problem

  • RemoteData returns a function (which is the function registered with the appropriate helper manager
  • ((RemoteData "url")) breaks ember
  • (()) (double paren) needed to "invoke the function returned by RemoteData"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant