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
model.runtimeType.toString() in Polymer expression doesn't produce an output #20980
Comments
Definitely was able to get a repro on this, pretty bizarre. I actually get an error from smoke error saying that String doesn't have a toString symbol, so it seems like it thinks that runtimeType is a String for some reason? Set owner to @jakemac53. |
Added Started label. |
turns out "String" here is because that's the string representation of the The error seems to be that smoke assumes that smoke.invoke(A, #foo) is a static method call. Turns out that no, in this case it is an instance method. |
Fixed in r40469 and released a new smoke version 0.2.1+1 Removed Pkg-Polymer label. |
Note that with dart2js minification there is no guarantee that model.runtimeType.toString() will be 'Foo', it might be mangled. It might be better for your code to expose the expressions you need in a different way. For example: if="{{mode.runtimeType == fooType}}" Where You could also do the updates in 2 steps (this however means that the UI will require 2 rounds of observable notifications, rather than 1: @observable @ObserveProperty('model') Cheers, |
This issue has been moved to dart-archive/smoke#17. |
This issue was originally filed by @zoechi
{{model.runtimeType}}
shows 'Foo' but
{{model.runtimeType.toString()}}
produces no output
I tried to use it like
<template if="{{model.runtimeType.toString() == 'Foo'}}">
but that didn't work
see http://stackoverflow.com/questions/25878785 for more details
Dart VM version: 1.7.0-edge.40314 (Tue Sep 16 05:31:11 2014) on "linux_x64"
Polymer 0.14.0+1
The text was updated successfully, but these errors were encountered: