Monday 1 May 2017

Directives In Angular 2.0

There are three kinds of directives:

Component Directives – These will create reusable components by encapsulating logic in JavaScript, HTML or an optional CSS style sheet.

Decorator Directives – These directives will be used to decorate elements 
Example: Adding a tooltip, or showing/hiding elements using ng-show/ng-hide.


Template Directives – These will turn HTML into a reusable template. The instantiating of the template and its insertion into the DOM can be fully controlled by the directive author. 
Examples: include ng-if and ng-repeat.

ANGULAR 2 VS 1.X

  1.  No more $scope
  2.  No more controllers
  3.  Component Based-UI
  4.  1-way data flow
  5.  ES6 / Typescript
  6.  New built-in directives
  7.  New DI system
  8.  Performance
  9.  Better Mobile Support
  10.  Server side render e Native Script
  11.  Embrace Flux and RxJS
  12.  Change Detection System 

Directives In Angular 2.0

There are three kinds of directives: Component Directives – These will create reusable components by encapsulating logic in JavaScrip...