This document provides an overview of core Angular 2 concepts, including:
1) Angular 2 introduces components instead of controllers and uses a one-way data flow instead of $scope. It is also written in TypeScript.
2) Angular 2 has a new dependency injection system, improved performance, better mobile support, and server-side rendering capabilities compared to AngularJS 1.x.
3) Key concepts in Angular 2 include components, communication between components, dependency injection, and the component lifecycle. Change detection and zones are also discussed.
2. 2 ANGULAR 2 CORE CONCEPT
FABIOBIONDI
UI Developer and Trainer
Sviluppo, formazione e
consulenza su
AngularJS, React,
CreateJS, D3.js e diverse
librerie Javascript.
3. 2 ANGULAR 2 CORE CONCEPT
MATTEORONCHI
Senior Software Engineer
Appassionato di
architetture e
ottimizzazioni da poco
aggiunto al team di
Workwave
5. 2 ANGULAR 2 CORE CONCEPT
• Goodbye $scope
• No more controllers
• Component Based-UI
• 1-way data flow
• ES6 / Typescript
• New built-in directives
ANGULAR 2 VS 1.X
6. 2 ANGULAR 2 CORE CONCEPT
• New DI system
• Performance
• Better Mobile Support
• Server side render e Native Script
• Embrace Flux and RxJS
• Change Detection System
ANGULAR 2 VS 1.X
24. 2 ANGULAR 2 CORE CONCEPT
Simple Service
export class MyService {
getData() {
return loadData.load();
}
}
25. 2 ANGULAR 2 CORE CONCEPT
import {Injectable} from ‘angular2/core’;
@Injectable()
export class MyService {
constructor(public loadData:LoadData) {}
getData() {
return loadData.load();
}
}
Inject Service to a Service