O'Reilly logo

Dart: Scalable Application Development by Ivo Balbaert, Sergey Akopkokhyants, Davy Mitchell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Binding and repeating over a list

In this recipe, we show you how the data of a list can be displayed in a Polymer component. So we perform data binding from the code to the UI here as well as in the following recipe. You can find the code for this recipe in the project databinding_list.

How to do it...

  1. The script starts from web\index.html, where a component with the name pol-list is imported through the line:
    <link rel="import"href="pol_list.html">

    From this, we know that the component is defined in pol_list.html, and the code behind it is in a file named pol_list.dart. For a discussion of the other tags, see the previous recipe.

  2. We define a list of companies that we want to display in the file pol_list.dart:
    import'dart:html'; import'package:polymer/polymer.dart'; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required