Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

dart-archive/sample-todomvc-polymer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

eed4a49 · Dec 5, 2017

History

35 Commits
Jan 15, 2016
Sep 25, 2015
Aug 26, 2015
Aug 18, 2015
Oct 29, 2014
Oct 29, 2014
Oct 29, 2014
Oct 29, 2014
Oct 29, 2014
Oct 6, 2015
Oct 29, 2014
Dec 5, 2017

Repository files navigation

Polymer TodoMVC Example

Build structured, encapsulated, client-side web apps with Dart and web components.

Polymer.dart

Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.

Polymer - www.polymer-project.org

Learning Polymer

The Polymer.dart wiki is a great resource for getting started.

Get help from Polymer devs and users:

Implementation

The Polymer implementation of TodoMVC has a few key differences with other implementations:

  • Since Web Components allow you to create new types of DOM elements, the DOM tree is very different from other implementations.
  • The template, styling, and behavior are fully encapsulated in each custom element. Instead of having an overall stylesheet (base.css or app.css), each element that needs styling has its own stylesheet.
  • Non-visual elements such as the router and the model are also implemented as custom elements and appear in the DOM. Implementing them as custom elements instead of plain objects allows you to take advantage of Polymer data binding and event handling throughout the app.

Running this sample

To run in Dartium (Chrome with Dart VM):

  1. Right click on web/index.html and choose "Run in Dartium"

To run in other browsers (such as Firefox, Internet Explorer, Safari, Chrome):

  1. Right click on pubspec.yaml and choose "Pub Build"
  2. After build finishes, expand the "build" directory
  3. Right click on index.html and choose "Run as JavaScript"