Quantcast
Viewing all articles
Browse latest Browse all 4826

This.get('filter')('') : why this is not throwing an error?

@alexandros84 wrote:

Hi,

It is week no2 for me in ember and I am coming from a rails-vanilla js background.

I would love someone to explain to me what this is:

this.get('filter')('').then((results) => this.set('results', results));

on https://guides.emberjs.com/v2.13.0/tutorial/autocomplete-component/ app/components/list-filter.js.

Point (1)---> the source of my confusion? this.get("filter")... and then follows another parens !!! ( ' ' )... why is this not throwing an error? I ve read the api doc def of get but there was nothing. What kind of syntax is that?

Point (2)---->And to which filter is the author referring? because on this. I see no "filter", property...

Also, the results param of the promise is predefined? Why nobody is telling to us if so?

A great guide so far but this section needs improvement..

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles