Search This Blog

Wednesday, July 23, 2014

Polymer Expressions

Polymer Expressions enable calling a function from the DOM of the polymer element.

  1. The function with a single input and single output.
  2. You need to import 'package:polymer_expressions/expression.dart';
The Polymer Expression I implemented formatted a DateTime to be human readable.  I imported 'package:intl/intl.dart';

readableDate(DateTime date){
var formatter = new DateFormat('EEEE MMMM d, yyyy');
return formatter.format(date);
}
For Practice: Take the Codelab and replace the filtered list of Codelabs with a function.

No comments:

Post a Comment