Template usability improvements
Pre-release
Pre-release
New features
- List inside List property support:
List<List<?>> @RepeatIndexas a shorthand for@EventData("event.model.index")for use with<dom-repeat>.- Polymer template class methods can be annotated with
@ClientDelegateto make them available asthis.$serveron the client. - Subproperties in two-way data bindings are now officially supported
Fixes
- Make list bindings work in SDM
Breaking changes
@EventHandleris now only used for exportingPolymerTemplateevent handlers. Use@ClientDelegatefor exporting an RPC target into theelement.$servernamespace.- Before 0.0.23
@EventHandleron a method in a class extendingPolymerTemplateis exported aselement.methodName.@EventHandleron a method in a class extendingComponent(but notPolymerTemplate) is exported aselement.$server.methodName.
- After 0.0.23
@EventHandleron a method in a class extendingPolymerTemplateis exported aselement.methodName.@ClientDelegateon a method in a class extendingComponent(includingPolymerTemplatesubclasses) is exported aselement.$server.methodName.
- Background: There are two different types of exported RPC targets intended for different situations. Prior to this change, it was not possible to use the
$serverapproach together withPolymerTemplatebecause the@EventHandlerannotation had different meaning depending on the context.element.methodNamefunctions are intended as Polymer event handlers. Any method parameters should be annotated with@EventDatato define what value to extract from the Polymer event.element.$server.methodNameare intended to be directly invoked from JS. Method parameters are directly encoded as JSON and made available on the server.
- Before 0.0.23
Demos
- Minesweeper demo now uses list bindings
- jQuery table demo was fixed
Tutorials
- Updated the list binding tutorial to highlight the
@RepeatIndexusage