Book Image

Learning Dart, Second Edition - Second Edition

By : Ivo Balbaert
Book Image

Learning Dart, Second Edition - Second Edition

By: Ivo Balbaert

Overview of this book

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

Creating the web_links project


Get the code with git clone git://github.com/dzenanr/web_links.git command. We start our discussion with the first spiral in the web_links\web_links_s01 project.

Spiral s01

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

Spiral s01 of web_links

The web\index.html start up HTML page imports the web component with:

     <link rel="import" href="packages/web_links/links_app.html">

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

    <links-app></links-app>

The lib\links_app.html file contains the UI definition of the component:

<link rel="import" href="../../packages/web_links/link_list.html">
<polymer-element name="links-app">
  <template>
    <link-list></link-list>
  </template>
  <script type="application/dart" src="links_app.dart"></script>
</polymer-element>

This in its...