Angular: @ViewChildren() with dart:html's Element does not work

Created on 30 Jan 2018  路  7Comments  路  Source: angulardart/angular

So going from...

class Comp {
  @ViewChild('foo')
  ElementRef foo;
}

... to ...

class Comp {
  @ViewChild('foo')
  Element foo;
}

... does not work. We'd need a similar fix as one from QueryList -> List.

compiler bug

All 7 comments

(This isn't strictly supported, but it will make the migration much easier)

Now fixed at HEAD!

@matanlurey - I'm using Angular alpha+7 and it doesn't seem to work. Is there anything preventing this from making it into a release? Thanks. /cc @kwalrath

How about for @ViewChildren()? Do I need to use the read: parameter in that case?

Should work the same, AFAIK. If not it could be a bug.

Scratch that, it was never implemented for ViewChildren. Let's re-open this.

This works now as #1078!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matanlurey picture matanlurey  路  3Comments

cedx picture cedx  路  6Comments

4cm4k1 picture 4cm4k1  路  5Comments

ranquild picture ranquild  路  6Comments

Tomucha picture Tomucha  路  5Comments