Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Learning Dart
  • Toc
  • feedback
Learning Dart

Learning Dart

4.4 (10)
close
Learning Dart

Learning Dart

4.4 (10)

Overview of this book

Mastering Dart by Projects is a step-by-step guide that aims to give you hands-on knowledge about programming in Dart using an example-based approach.If you want to become a web developer, or perhaps you already are a web developer but you want to add Dart to your tool belt, then this book is for you. This book assumes that you have at least some knowledge of HTML and how web applications work. Some previous programming experience, preferably in a modern language like C#, Java, Python, Ruby, or JavaScript, will also give you a head start. You can also work with Dart on your preferred platform, be it Linux, Mac OS X, or Windows.
Table of Contents (14 chapters)
close
13
Index

Two-way data binding in Polymer.dart


Model Driven View (MDV) is a set of techniques to help you bind data to your views, in a more direct way than we did in Chapter 6, Combining HTML5 Forms with Dart. The idea here is simple:

  • We have one or more classes (with properties) in a model

  • Our app contains one or more views (implemented as web components) for presenting the model's data (the data binding)

Note

For code files of this section, refer to code\chapter_8\bank_terminal in the code bundle.

Data binding can be a one-way (model to view) with or without observing (monitoring) changes in the model: this means data from our model (a variable or a method that returns a value) is shown (read-only) on the page and we do this by writing {{var}} in the web page and marking the variable var in code as: @observable var. When its value changes, the altered value is shown in the web page. In general, you can show any Dart expression with the notation {{ expression }}, but be careful that the expression doesn...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete