Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

How to use Map literals in Polymer binding #507

Closed
DartBot opened this issue Jun 5, 2015 · 6 comments
Closed

How to use Map literals in Polymer binding #507

DartBot opened this issue Jun 5, 2015 · 6 comments

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="96" height="96"hspace="10"> Issue by zoechi
Originally opened as dart-lang/sdk#19461


I tried to do assign a map to a published attribute.
Map literals work for the class attribute but I thought it should also work for custom attributes.

@published Map options;

<bwu-sparkline options="{{ {'width': 34, 'height': 16} }}"></bwu-sparkline>
 
I get this error:

Breaking on exception: type 'String' is not a subtype of type 'Map' of 'value'.

Dart VM version: 1.5.0-edge.37335 (Fri Jun 13 16:07:16 2014) on "linux_x64"
polymer_expressions 0.10.0
polymer 0.10.1+1

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi


When I change my published field to

@published String options

I get this error

Breaking on exception: type '_LinkedHashMap' is not a subtype of type 'String' of 'value'.

@published var options

works so far.
I think this should work with

@published Map options

too.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Added this to the 1.6 milestone.
Removed Priority-Unassigned label.
Added Priority-Medium label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed this from the 1.6 milestone.
Added Polymer-P-1 label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed Polymer-P-1 label.
Added Polymer-Milestone-Next label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Added PolymerMilestone-Next label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed Polymer-Milestone-Next label.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants