You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The intention has always been that options.forwardHostProp was required to be specified in order for host properties (e.g. prop2) to be forwarded to templatizer instances. There was a bug of sorts pre 2.5, however, in that host props were always pulled from the host and set on instances at instance creation time only; however, if the host properties change after the fact, they would not be forwarded (see your jsBin modified to actually modify prop2: http://jsbin.com/kubejog/edit?html,console,output). So while you were seeing prop2 forwarded in once, this was a bit of a fluke since it wouldn't stay in sync.
Since this is a bit of a footgun, this was normalized in #5035, such that host property forwarding is only done when options.forwardHostProp is specified, since the docs only mention host prop forwarding in the context of specifying this option. I've updated your jsBin to add a forwardHostProp function (it is called _forwardHostPropV2 when using the legacy Templatizer behavior API in 2.x): http://jsbin.com/sedofid/1/edit?html,console,output
I also updated your code to use the templatizer library syntax, which is a bit cleaner (once you're using non-hybrid Polymer.Element, there is no need to use the legacy behavior): http://jsbin.com/ximowuc/edit?html,console,output
Let me know if you're ok with this change. It's sort of in a gray area of breaking-vs-bugfix, since the intention has always been that forwardHostProp was required, but you were obviously relying on the existing (undocumented) behavior. Thanks.
Hello @kevinpschaaf,
We have a bug since the 2.5 release and in particular with this commit: bde5898. (related to #4458)
Now, when we have a property in the template of the element which have a templatizer, it doesn't work.
You can see a live demo:
http://jsbin.com/kafopovoqo/1/edit?html,console,output
prop2
is never displayed, if you rollback to the 2.4 it is ok.The text was updated successfully, but these errors were encountered: