Book Image

Learning Dart

Book Image

Learning Dart

Overview of this book

Table of Contents (19 chapters)
Learning Dart
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating the polymer_links project


Get the code with: git clone git://github.com/dzenanr/polymer_links.git. We start our discussion with the first spiral in this project: polymer_links\polymer_links_s01.

Spiral s01

In this spiral, we just show a web component that contains a list of links of type String, as shown in the following screenshot:

Spiral s01 of polymer_links

The startup HTML page polymer_links.html imports the web component with:

     <link rel="import" href="links.html">

The component with name web-links is instantiated in the <body> tag of the page:

    <h1>Web Links</h1>
    <web-links></web-links>

The links.html file contains the UI definition of the component:

<polymer-element name="web-links">
  <template>                                                  (1)
    <ul>
      <template repeat="{{webLink in webLinks}}">             (2)
        <li>
          <a href="{{webLink}}">                              (3...