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

Angular.dart


(See www.angularjs.org, the Dart project is on https://github.com/angular/angular.dart)

Angular.js (or Angular for short) is a popular open source JavaScript framework, maintained by Google, for developing single-page applications. Its goal is to make browser-based apps with MVC capabilities in an effort to make both development and testing easier. It accomplishes this by using declarative programming for building UI and wiring software components. It uses a templating system with a number of so called directives (starting with ng-) to specify customizable and reusable HTML tags and expressions that moderate the behavior of certain elements; for example, ng-repeat for instantiating an element for each item from a collection, or ng-model for 2-way data binding:

<input type="text" ng-model="lastName" placeholder="Your name"> 

The $scope service detects changes to the model and modifies HTML expressions in the view via a controller. Likewise, any alterations to the view are...