Polymer TodoMVC Example
Build structured, encapsulated, client-side web apps with Dart and web components.
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.
The Polymer.dart wiki is a great resource for getting started.
Get help from Polymer devs and users:
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 (
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):
- Right click on web/index.html and choose "Run in Dartium"
To run in other browsers (such as Firefox, Internet Explorer, Safari, Chrome):
- Right click on pubspec.yaml and choose "Pub Build"
- After build finishes, expand the "build" directory