Wednesday, February 15, 2017

Angular Tutorials

Angular Tutorials

angular2 in 15min Duncan Hunter youtube
This tutorial is a practical Angular 2 resource for programmers who are building or want to build web client applications under HTML and Typescript (Typescript is compiled into JavaScript).

We will discover the Angular 2 architecture, directives, components, services, routing, styling, events, validation, unit testing, and everything we need in our daily work
Data binding is the mechanism used to ensure the linking between what a user see on the screen and the data value in our class. (Front <-> Back)

Angular 2 uses a Framework to manage the Data binding. Binding is 2 way - you type into the field and the object gets updated. Update the object and the control is updated.

All what you need to do is to declare the binding between a source and a target.

Example : <input type=’’Text’’ [(target)] = “expression” value=’myData’>

  • One-way (from data to view –>):
Interpolation : {{expression}}
Property           :  [target]
Attribute          : [attr.]
Class                   : [class.]
Style                    :[style.]
  • One-way (from view to data <–)
Event   : (click)= ‘’expression ‘’
  • Two-way (<—->)
Two-way   : [(target)] = “expression