SlideShare a Scribd company logo
AN INTRODUCTION TO
ANGULAR 2
Ivan Matiishyn
Senior front-end developer @DataArt
2016
Agenda
1. What is Angular2
2. TypeScript
3. Angular2 ecosystem
4. Component Architecture
What is Angular2?
What is Angular2?
• JavaScript framework for SPA (link)
• DI, Change Detection
• Everything you need for complex app
• Current state - RC5
• Server-side Rendering (link)
• Lazy Loading
• Native App Support (link)
• Web Workers
4

Recommended for you

Angular2 - getting-ready
Angular2 - getting-ready Angular2 - getting-ready
Angular2 - getting-ready

Presentation made for the NG-CONF Israel 2015 (http://ng-conf.co.il/) Angular2 is just around the corner.. so, how can we prepare our angular 1.x code base to the migration? An example project that come along with those slides available on Github (links inside)

angularecmascript6angular2
Angular 2 - a New Hope
Angular 2 - a New HopeAngular 2 - a New Hope
Angular 2 - a New Hope

Angular 2 is a JavaScript framework for building client applications. It uses TypeScript for static typing and supports mobile and desktop applications. The key aspects covered are components, which encapsulate templates and logic, bindings for data flow, services for reusable logic, routers for navigation, and directives for extending DOM elements. The document recommends using the Angular CLI for building applications and compares Angular 2 to other frameworks, noting its emphasis on simplicity, functionality, and convenience.

angular 2web developmentangular
Angular 2 - The Next Framework
Angular 2 - The Next FrameworkAngular 2 - The Next Framework
Angular 2 - The Next Framework

Angular 2 is the next version of the AngularJS framework. It was released in 2016 after 2 years of development. Some key features of Angular 2 include optimized performance for both desktop and mobile applications, ahead of time compilation for faster loading, and native support for reactive programming. The document then provides examples of core Angular concepts like components, directives, services, dependency injection and change detection. It explains how Angular 2 applications are bootstrapped and discusses some of the internal workings like the change detection engine.

googleframeworkcommit software
TypeScript
5
TypeScript
ES2016
ES2015
ES5
6
TypeScript
Types:
• string
• number
• boolean
• Array
• any
• Custom types
7
Tools:
• VS Code
• Playground (link)
Angular2 ecosystem
8

Recommended for you

The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2

This document provides an overview of Angular 2 and its main building blocks including modules, components, templates, data binding, directives, services, and routing. It discusses how Angular 2 differs from Angular 1 and is more opinionated. It also provides code examples for setting up the main module, creating components and templates, using dependency injection for services, and making HTTP requests from services.

devfestangularjs
AngularJS2 / TypeScript / CLI
AngularJS2 / TypeScript / CLIAngularJS2 / TypeScript / CLI
AngularJS2 / TypeScript / CLI

Exploring AngularJS 2, TypeScript and the new AngularJS CLI, which simplifies the creation and deployment of web applications

html5typescriptangularjs 2
Quick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developersQuick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developers

Quick and dirty introduction to main concepts of Angular Web applications. These slides where accompanied by a workshop that took place in Decerto for fellow professionals.

typescriptangular clijavascript
Angular2 ecosystem
• @Component
9
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<h1>Hello World</h1>`
})
export class AppComponent { }
Angular2 ecosystem
• @Component (Styling)
10
// Styles in Metadata
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<h1>Test</h1>`,
styles: [` h1 { color: red } `]
})
export class AppComponent {}
// Style URLs in Metadata
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<h1>Test</h1>`,
styleUrls: [ 'app/app.component.css' ]
})
export class AppComponent {}
Angular2 ecosystem
• @Component (Lifecycle)
11
import { Component, OnInit, OnDestroy } from
'@angular/core';
@Component({
selector: 'my-app',
template: `<h1>Test</h1>`
})
export class AppComponent implements OnInit, OnDestroy {
ngOnInit() { }
ngOnDestroy() { }
}
Angular2 ecosystem
• @Component
• @NgModule
12
// decorator defines the metadata for the module
import { NgModule } from '@angular/core';
// application service providers, common directives
import { BrowserModule } from '@angular/platform-browser';
// root component
import { AppComponent } from './app.component';
@NgModule({
imports: [ BrowserModule ], // importing other modules
declarations: [ AppComponent ], // components, directives that are part of this module
bootstrap: [ AppComponent ] // root component that Angular should bootstrap
})
export class AppModule { }

Recommended for you

Building Universal Applications with Angular 2
Building Universal Applications with Angular 2Building Universal Applications with Angular 2
Building Universal Applications with Angular 2

Angular is one of the most popular frameworks for the development of Single-Page Applications (SPA). Recently Google announced its second major version, which brings some brand new ideas and improvements. For instance, Angular 2 is written in TypeScript, has much faster change detection and allows development of universal (isomorphic) applications. In this talk we're going to introduce the motivation behind the new design decisions and the improvements in Angular 2. We'll take a look at the building blocks the framework provides for the development of professional single-page applications.

angularjsprogrammingdevelopment
Building scalable modular app with Angular2 concept
Building scalable modular app with Angular2 conceptBuilding scalable modular app with Angular2 concept
Building scalable modular app with Angular2 concept

This document provides an introduction to building scalable and modular applications with AngularJS 2. It discusses key AngularJS 2 concepts like scalability, modularity, and comparisons to AngularJS 1. It also outlines some of AngularJS 2's main features like its universal rendering capabilities and use of TypeScript. Finally, it proposes a sample project structure using modules for user authentication, profile management, and todo lists to demonstrate modularity in AngularJS 2.

 
by kzw
scalabilityangularjs2
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training

Learn all the essentials of building Angular 2 applications right here. https://www.udemy.com/angular-2-training/?couponCode=UANGULAR2 This is a beginner level course aimed at those new to Angular 2 and Typescript. No previous knowledge of either is required before starting this course. This course combines slides, projects and quizzes in a clear, concise and engaging way to guide you through the core concepts of Angular 2 and Typescript. You will gain a solid foundation for building real-world applications following best practices and the Angular 2 style guide. This includes how to build components, create shared services, navigate between views, manage data, and managing user and system events.

softwarecodingengineering
Angular2 ecosystem
• @Component
• @NgModule
• Bootstrap application
13
// Angular's browser platformBrowserDynamic function
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
// application module
import { AppModule } from './app.module';
// bootstrapping
platformBrowserDynamic().bootstrapModule(AppModule);
Angular2 ecosystem
• @Component
• @NgModule
• Bootstrap application
• Services
14
import { Injectable } from '@angular/core';
@Injectable()
export class AppService {
getUsers(): any[] {
return []
}
}
Angular2 ecosystem
• @Component
• @NgModule
• Bootstrap application
• Services (DI)
15
@NgModule({
imports: [ BrowserModule ],
declarations: [ AppComponent],
bootstrap: [ AppComponent ],
providers: [ AppService ]
})
export class AppModule { }
import { Component, OnInit } from '@angular/core';
import {AppService} from './app.service'
@Component({
selector: 'my-app',
templateUrl: 'app.component.html',
providers: [AppService]
})
export class AppComponent implements OnInit {
users: any[]
// Angular Dependency Injection
constructor( private appService: AppService){}
// Using service
ngOnInit() {
this.users = this.appService.getUsers();
}
}
Angular2 ecosystem
• @Component
• @NgModule
• Bootstrap application
• Services
• routing, pipes, forms, http, animations…
16

Recommended for you

Angular 2... so can I use it now??
Angular 2... so can I use it now??Angular 2... so can I use it now??
Angular 2... so can I use it now??

Angular 2 is now in release candidate and can be used for new projects, though Angular 1 will still be supported for the next 1.5-2 years. There are two main approaches to upgrading an existing Angular 1 app to Angular 2: big bang, where the entire app is rewritten at once in Angular 2, or incremental, where individual components are upgraded one by one. Components and directives are now unified under the component model in Angular 2. TypeScript is recommended for Angular 2 development but not required, as JavaScript can also be used.

angular2montrealtypescript
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2

AngularJS 1.3 is by far the best version of Angular available today. It was just released a few weeks ago. It's chock full of bug fixes, feature enhancements and performance improvements. YouTube link: - https://youtu.be/bghVyCbxj6g

angularjsjsknowledge sharing
Migrating to Angular 2
Migrating to Angular 2Migrating to Angular 2
Migrating to Angular 2

Presented at FITC Toronto 2016 See details at www.fitc.ca AngularJS was originally created in 2009 as an end-to-end solution for web designers wanting to build simple web apps. Over the last 6 years it has evolved into a component based MVC framework targeted at JavaScript developers. To maintain backward compatibility, Angular has had to hold onto many deprecated concepts. This has caused some of Angular’s APIs to be complex and easy to misuse. Angular 2 is a complete rewrite of Angular 1 which eliminates the outdated concepts and takes full advantage of modern web standards like ES6, TypeScript, and Web Components. In this session you’ll learn which Angular 1 features to avoid and how to write an Angular 1 app that will be easy to migrate into Angular 2. We’ll go through the process of refactoring an Angular 1 app to prep it for migration. Then Rob will demonstrate how to incrementally migrate to Angular 2. You’ll come away from this session with a better understanding of what Angular 2 has to offer and how to start taking advantage of it. Objective To make the migration from Angular 1 to Angular 2 as painless as possible Target Audience Anyone using Angular 1 or interested in learning Angular 2. Assumed Audience Knowledge Some experience with JavaScript and Angular 1 Five Things Audience Members Will Learn How to write an Angular 1 app that will be easy to migrate Using TypeScript, ES6 modules, and the component router with Angular 1 The benefits of Angular 2 How to run Angular 1 and 2 in the same app How to migrate an Angular 1 app to Angular 2

 
by FITC
frameworkweb developmentangularjs
Component Architecture
17
Component Architecture
• Thinking in React Components (link)
18
19
Component Architecture
• Thinking in React Components (link)
• One way data flow
20

Recommended for you

Angular 2
Angular 2Angular 2
Angular 2

What is a Angular Js ? What is the main benefits of Angular Js ? What is the difference between Angular js 1 and Angular js 2 ? Structure of Angular Js ? Choose of Language|Editor ? Introduction of Components. Template, Interpolation and Directives. Data Binding and Pipes. ,Angular 2 is Javascript framework

basic of angular js 2start angular 2angular
Adventures with Angular 2
Adventures with Angular 2Adventures with Angular 2
Adventures with Angular 2

My adventures with Angular2 from first install (BETA.3) to the official release. What made us decide to pick Angular 2 since its beta phase, why we didn't stop when we saw that it wasn't quite ok to work with beta versions, how we managed to keep our up up to date with version updates (sometimes even twice a week), how we rewrote our application several times and how we found solutions to most problems.

angular2 updatesangular2 npmangular2
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2

Video: https://youtu.be/c_YVA-Aa7gA New language, new framework, new tools and new concepts. Angular 2 beta is ready and gives developers a solid ground to build their applications. This talk will go through the core concepts of Angular 2 including components, directives, observables and more!

angular2typescriptcorkdev
21
demo
22
Angular CLI
23
Angular CLI (GitHub)
• create a project from scratch
• scaffold components, directives, services, etc.
• lint your code
• serve the application
• run your unit tests and end to end tests.
24

Recommended for you

Angular 2 Crash Course
Angular  2 Crash CourseAngular  2 Crash Course
Angular 2 Crash Course

This presentation is dedicated to studying the fundamentals of Angular 2. To follow along with the presentation, watch this 3-part YouTube Series here: http://bit.ly/2mnLZNz You can also download Traversy's Spotify App here: http://bit.ly/2m1TxI3

javascriptangular 2
Express: A Jump-Start
Express: A Jump-StartExpress: A Jump-Start
Express: A Jump-Start

Slide deck presented during my session on "Express: A Jump-Start" at JavaScript Meetup #4 on Saturday, July 23, 2016. The meetup happened at Portea Medical, Bengaluru.

web developmentjavascripthtml5
A Story about AngularJS modularization development
A Story about AngularJS modularization developmentA Story about AngularJS modularization development
A Story about AngularJS modularization development

The more your AngularJS App is growing the more important is modularization. It starts with the naming convention, file structure, AMD, goes through the build process, loading and packaging strategies and ends in the browser. We are going to give proposed solutions in practice as a ground for discussion. Further, you are welcome to present your ideas in slides or code, which demonstrate how to manage modularization in Angular.js projects. Speaker Bio: Johannes Weber has spent more than 10 years in front- and backend development. He works for Mayflower GmbH where he focuses on the migration of SPA and MPA. David Amend ist seit Jahren im Banken-Umfeld mit Schwerpunkt auf der Frontend-Entwicklung mithilfe von Java und JavaScript in Projekten tätig.

javascriptmodularizationangularjs
Components in Angular 1
25
from Directives to Components
26
app.directive('myApp', function () {
return {
template: '<div>{{ctrl.name}}</div>',
scope: {
name: '='
},
controller: function () {
this.name = 'John'
},
controllerAs: 'ctrl',
bindToController: true
};
});
app.component('myApp', {
template: '<div>{{$ctrl.name}}</div>',
binding: {
name: '<' // one-way binding
},
controller: function () {
this.name = 'John'
}
});
from Directives to Components
27
• Components have a well-defined public API - Inputs and Outputs
– Inputs should be using < and @ bindings
– Outputs are realized with & bindings
• Components have a well-defined lifecycle
– $onInit()
– $onChanges(changesObj)
– $doCheck()
– $onDestroy()
– $postLink()
• An application is a tree of components (minimize two-way data
binding)
Thank You
28

Recommended for you

Formular handling in AngularJS
Formular handling in AngularJSFormular handling in AngularJS
Formular handling in AngularJS

Bei der Entwicklung von AngularJS Anwendungen stellt das Formularhandling zu beginn eine große Herausforderung dar. Wie funktioniert die Validierung, welche Möglichkeiten gibt es eigene Validatoren einzubinden? Die Slides befassen schneiden folgende Themen an und veranschaulichen diese in einer Demo: ModelController, FormController, Validierung, Custom Validators Slides zum Talk von Johannes Weber (@jowe) des ersten AngularJS Munich Meetups vom 13. Februar 2014

angularjsformhandlingmeetup
Angular2 intro
Angular2 introAngular2 intro
Angular2 intro

This document provides an introduction and overview of Angular 2. It discusses how Angular 2 is easier to reason about and maintain than Angular 1, with fewer concepts, simplified dependency injection, one-way data binding, and other improvements. It also highlights better performance in Angular 2 with features like faster rendering, lazy loading, and server-side rendering. The document ends by demonstrating a quick example of a Todo application built with Angular 2 and Firebase.

javascriptangularangular2
An Intro to Angular 2
An Intro to Angular 2An Intro to Angular 2
An Intro to Angular 2

Development on the Salesforce platform continues to be much more JavaScript centric. One of the most popular JavaScript frameworks in use, AngularJS, has undergone major changes in the upcoming Angular 2 release.

angularjavascriptsalesforce

More Related Content

What's hot

The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5
Johannes Weber
 
An introduction to Angular2
An introduction to Angular2 An introduction to Angular2
An introduction to Angular2
Apptension
 
Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2
Ross Dederer
 
Angular2 - getting-ready
Angular2 - getting-ready Angular2 - getting-ready
Angular2 - getting-ready
Nir Kaufman
 
Angular 2 - a New Hope
Angular 2 - a New HopeAngular 2 - a New Hope
Angular 2 - a New Hope
Sami Suo-Heikki
 
Angular 2 - The Next Framework
Angular 2 - The Next FrameworkAngular 2 - The Next Framework
Angular 2 - The Next Framework
Commit University
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2
Maurice De Beijer [MVP]
 
AngularJS2 / TypeScript / CLI
AngularJS2 / TypeScript / CLIAngularJS2 / TypeScript / CLI
AngularJS2 / TypeScript / CLI
Domenico Rutigliano
 
Quick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developersQuick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developers
Paweł Żurowski
 
Building Universal Applications with Angular 2
Building Universal Applications with Angular 2Building Universal Applications with Angular 2
Building Universal Applications with Angular 2
Minko Gechev
 
Building scalable modular app with Angular2 concept
Building scalable modular app with Angular2 conceptBuilding scalable modular app with Angular2 concept
Building scalable modular app with Angular2 concept
kzw
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training
Patrick Schroeder
 
Angular 2... so can I use it now??
Angular 2... so can I use it now??Angular 2... so can I use it now??
Angular 2... so can I use it now??
Laurent Duveau
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
Knoldus Inc.
 
Migrating to Angular 2
Migrating to Angular 2Migrating to Angular 2
Migrating to Angular 2
FITC
 
Angular 2
Angular 2Angular 2
Angular 2
Nigam Goyal
 
Adventures with Angular 2
Adventures with Angular 2Adventures with Angular 2
Adventures with Angular 2
Dragos Ionita
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
Dawid Myslak
 
Angular 2 Crash Course
Angular  2 Crash CourseAngular  2 Crash Course
Angular 2 Crash Course
Elisha Kramer
 
Express: A Jump-Start
Express: A Jump-StartExpress: A Jump-Start
Express: A Jump-Start
Naveen Pete
 

What's hot (20)

The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5
 
An introduction to Angular2
An introduction to Angular2 An introduction to Angular2
An introduction to Angular2
 
Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2
 
Angular2 - getting-ready
Angular2 - getting-ready Angular2 - getting-ready
Angular2 - getting-ready
 
Angular 2 - a New Hope
Angular 2 - a New HopeAngular 2 - a New Hope
Angular 2 - a New Hope
 
Angular 2 - The Next Framework
Angular 2 - The Next FrameworkAngular 2 - The Next Framework
Angular 2 - The Next Framework
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2
 
AngularJS2 / TypeScript / CLI
AngularJS2 / TypeScript / CLIAngularJS2 / TypeScript / CLI
AngularJS2 / TypeScript / CLI
 
Quick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developersQuick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developers
 
Building Universal Applications with Angular 2
Building Universal Applications with Angular 2Building Universal Applications with Angular 2
Building Universal Applications with Angular 2
 
Building scalable modular app with Angular2 concept
Building scalable modular app with Angular2 conceptBuilding scalable modular app with Angular2 concept
Building scalable modular app with Angular2 concept
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training
 
Angular 2... so can I use it now??
Angular 2... so can I use it now??Angular 2... so can I use it now??
Angular 2... so can I use it now??
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Migrating to Angular 2
Migrating to Angular 2Migrating to Angular 2
Migrating to Angular 2
 
Angular 2
Angular 2Angular 2
Angular 2
 
Adventures with Angular 2
Adventures with Angular 2Adventures with Angular 2
Adventures with Angular 2
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Angular 2 Crash Course
Angular  2 Crash CourseAngular  2 Crash Course
Angular 2 Crash Course
 
Express: A Jump-Start
Express: A Jump-StartExpress: A Jump-Start
Express: A Jump-Start
 

Viewers also liked

A Story about AngularJS modularization development
A Story about AngularJS modularization developmentA Story about AngularJS modularization development
A Story about AngularJS modularization development
Johannes Weber
 
Formular handling in AngularJS
Formular handling in AngularJSFormular handling in AngularJS
Formular handling in AngularJS
Johannes Weber
 
Angular2 intro
Angular2 introAngular2 intro
Angular2 intro
Shawn McKay
 
An Intro to Angular 2
An Intro to Angular 2An Intro to Angular 2
An Intro to Angular 2
Ron Heft
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
Jesse Warden
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
Johannes Weber
 
Getting Started with Angular 2
Getting Started with Angular 2Getting Started with Angular 2
Getting Started with Angular 2
FITC
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core Concepts
Fabio Biondi
 

Viewers also liked (8)

A Story about AngularJS modularization development
A Story about AngularJS modularization developmentA Story about AngularJS modularization development
A Story about AngularJS modularization development
 
Formular handling in AngularJS
Formular handling in AngularJSFormular handling in AngularJS
Formular handling in AngularJS
 
Angular2 intro
Angular2 introAngular2 intro
Angular2 intro
 
An Intro to Angular 2
An Intro to Angular 2An Intro to Angular 2
An Intro to Angular 2
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Getting Started with Angular 2
Getting Started with Angular 2Getting Started with Angular 2
Getting Started with Angular 2
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core Concepts
 

Similar to Introduction to Angular2

Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web Services
David Giard
 
Meetup SkillValue - Angular 6 : Bien démarrer son application
Meetup SkillValue - Angular 6 : Bien démarrer son applicationMeetup SkillValue - Angular 6 : Bien démarrer son application
Meetup SkillValue - Angular 6 : Bien démarrer son application
Thibault Even
 
Commit University - Exploring Angular 2
Commit University - Exploring Angular 2Commit University - Exploring Angular 2
Commit University - Exploring Angular 2
Commit University
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Frost
 
Angular js 2
Angular js 2Angular js 2
Angular js 2
Ran Wahle
 
What is your money doing?
What is your money doing?What is your money doing?
What is your money doing?
Alfonso Fernández
 
ChtiJUG - Introduction à Angular2
ChtiJUG - Introduction à Angular2ChtiJUG - Introduction à Angular2
ChtiJUG - Introduction à Angular2
Demey Emmanuel
 
better-apps-angular-2-day1.pdf and home
better-apps-angular-2-day1.pdf  and homebetter-apps-angular-2-day1.pdf  and home
better-apps-angular-2-day1.pdf and home
ChethanGowda886434
 
Angular 2.0
Angular  2.0Angular  2.0
Angular 2.0
Mallikarjuna G D
 
Technozaure - Angular2
Technozaure - Angular2Technozaure - Angular2
Technozaure - Angular2
Demey Emmanuel
 
Moving From AngularJS to Angular 2
Moving From AngularJS to  Angular 2 Moving From AngularJS to  Angular 2
Moving From AngularJS to Angular 2
Exilesoft
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6
William Marques
 
Angular IO
Angular IOAngular IO
Angular IO
Jennifer Estrada
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
Yakov Fain
 
Angular 2 in-1
Angular 2 in-1 Angular 2 in-1
Angular 2 in-1
GlobalLogic Ukraine
 
Angular 4 for Java Developers
Angular 4 for Java DevelopersAngular 4 for Java Developers
Angular 4 for Java Developers
Yakov Fain
 
Bootiful Development with Spring Boot and Angular - RWX 2018
Bootiful Development with Spring Boot and Angular - RWX 2018Bootiful Development with Spring Boot and Angular - RWX 2018
Bootiful Development with Spring Boot and Angular - RWX 2018
Matt Raible
 
はじめてのAngular2
はじめてのAngular2はじめてのAngular2
はじめてのAngular2
Kenichi Kanai
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
Troy Miles
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2
Maurice De Beijer [MVP]
 

Similar to Introduction to Angular2 (20)

Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web Services
 
Meetup SkillValue - Angular 6 : Bien démarrer son application
Meetup SkillValue - Angular 6 : Bien démarrer son applicationMeetup SkillValue - Angular 6 : Bien démarrer son application
Meetup SkillValue - Angular 6 : Bien démarrer son application
 
Commit University - Exploring Angular 2
Commit University - Exploring Angular 2Commit University - Exploring Angular 2
Commit University - Exploring Angular 2
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
 
Angular js 2
Angular js 2Angular js 2
Angular js 2
 
What is your money doing?
What is your money doing?What is your money doing?
What is your money doing?
 
ChtiJUG - Introduction à Angular2
ChtiJUG - Introduction à Angular2ChtiJUG - Introduction à Angular2
ChtiJUG - Introduction à Angular2
 
better-apps-angular-2-day1.pdf and home
better-apps-angular-2-day1.pdf  and homebetter-apps-angular-2-day1.pdf  and home
better-apps-angular-2-day1.pdf and home
 
Angular 2.0
Angular  2.0Angular  2.0
Angular 2.0
 
Technozaure - Angular2
Technozaure - Angular2Technozaure - Angular2
Technozaure - Angular2
 
Moving From AngularJS to Angular 2
Moving From AngularJS to  Angular 2 Moving From AngularJS to  Angular 2
Moving From AngularJS to Angular 2
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6
 
Angular IO
Angular IOAngular IO
Angular IO
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
 
Angular 2 in-1
Angular 2 in-1 Angular 2 in-1
Angular 2 in-1
 
Angular 4 for Java Developers
Angular 4 for Java DevelopersAngular 4 for Java Developers
Angular 4 for Java Developers
 
Bootiful Development with Spring Boot and Angular - RWX 2018
Bootiful Development with Spring Boot and Angular - RWX 2018Bootiful Development with Spring Boot and Angular - RWX 2018
Bootiful Development with Spring Boot and Angular - RWX 2018
 
はじめてのAngular2
はじめてのAngular2はじめてのAngular2
はじめてのAngular2
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2
 

Recently uploaded

20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
Matthew Sinclair
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
Lidia A.
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
Sally Laouacheria
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 

Recently uploaded (20)

20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 

Introduction to Angular2

  • 1. AN INTRODUCTION TO ANGULAR 2 Ivan Matiishyn Senior front-end developer @DataArt 2016
  • 2. Agenda 1. What is Angular2 2. TypeScript 3. Angular2 ecosystem 4. Component Architecture
  • 4. What is Angular2? • JavaScript framework for SPA (link) • DI, Change Detection • Everything you need for complex app • Current state - RC5 • Server-side Rendering (link) • Lazy Loading • Native App Support (link) • Web Workers 4
  • 7. TypeScript Types: • string • number • boolean • Array • any • Custom types 7 Tools: • VS Code • Playground (link)
  • 9. Angular2 ecosystem • @Component 9 import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: `<h1>Hello World</h1>` }) export class AppComponent { }
  • 10. Angular2 ecosystem • @Component (Styling) 10 // Styles in Metadata import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: `<h1>Test</h1>`, styles: [` h1 { color: red } `] }) export class AppComponent {} // Style URLs in Metadata import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: `<h1>Test</h1>`, styleUrls: [ 'app/app.component.css' ] }) export class AppComponent {}
  • 11. Angular2 ecosystem • @Component (Lifecycle) 11 import { Component, OnInit, OnDestroy } from '@angular/core'; @Component({ selector: 'my-app', template: `<h1>Test</h1>` }) export class AppComponent implements OnInit, OnDestroy { ngOnInit() { } ngOnDestroy() { } }
  • 12. Angular2 ecosystem • @Component • @NgModule 12 // decorator defines the metadata for the module import { NgModule } from '@angular/core'; // application service providers, common directives import { BrowserModule } from '@angular/platform-browser'; // root component import { AppComponent } from './app.component'; @NgModule({ imports: [ BrowserModule ], // importing other modules declarations: [ AppComponent ], // components, directives that are part of this module bootstrap: [ AppComponent ] // root component that Angular should bootstrap }) export class AppModule { }
  • 13. Angular2 ecosystem • @Component • @NgModule • Bootstrap application 13 // Angular's browser platformBrowserDynamic function import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; // application module import { AppModule } from './app.module'; // bootstrapping platformBrowserDynamic().bootstrapModule(AppModule);
  • 14. Angular2 ecosystem • @Component • @NgModule • Bootstrap application • Services 14 import { Injectable } from '@angular/core'; @Injectable() export class AppService { getUsers(): any[] { return [] } }
  • 15. Angular2 ecosystem • @Component • @NgModule • Bootstrap application • Services (DI) 15 @NgModule({ imports: [ BrowserModule ], declarations: [ AppComponent], bootstrap: [ AppComponent ], providers: [ AppService ] }) export class AppModule { } import { Component, OnInit } from '@angular/core'; import {AppService} from './app.service' @Component({ selector: 'my-app', templateUrl: 'app.component.html', providers: [AppService] }) export class AppComponent implements OnInit { users: any[] // Angular Dependency Injection constructor( private appService: AppService){} // Using service ngOnInit() { this.users = this.appService.getUsers(); } }
  • 16. Angular2 ecosystem • @Component • @NgModule • Bootstrap application • Services • routing, pipes, forms, http, animations… 16
  • 18. Component Architecture • Thinking in React Components (link) 18
  • 19. 19
  • 20. Component Architecture • Thinking in React Components (link) • One way data flow 20
  • 21. 21
  • 24. Angular CLI (GitHub) • create a project from scratch • scaffold components, directives, services, etc. • lint your code • serve the application • run your unit tests and end to end tests. 24
  • 26. from Directives to Components 26 app.directive('myApp', function () { return { template: '<div>{{ctrl.name}}</div>', scope: { name: '=' }, controller: function () { this.name = 'John' }, controllerAs: 'ctrl', bindToController: true }; }); app.component('myApp', { template: '<div>{{$ctrl.name}}</div>', binding: { name: '<' // one-way binding }, controller: function () { this.name = 'John' } });
  • 27. from Directives to Components 27 • Components have a well-defined public API - Inputs and Outputs – Inputs should be using < and @ bindings – Outputs are realized with & bindings • Components have a well-defined lifecycle – $onInit() – $onChanges(changesObj) – $doCheck() – $onDestroy() – $postLink() • An application is a tree of components (minimize two-way data binding)

Editor's Notes

  1. Hi guys! My name is Ivan, I work as a front-end developer at DataArt Wroclaw
  2. And today we are gonna be talking about the Angular2. What is it, Quickly review the TypeScript And discover the NG2 ecosystem After that we’ll take a look at the architectural approach of building ng2 apps
  3. Now, before we begin, please let me know, how many of you have any experience with Angular 1? Nice. So, you are familiar with some concepts like routing, services, directives, and SPA.
  4. First of all it’s a JS framework for building SPAs it was rewritten from scratch, improved DI and new Change detection – no more $digest cycles Two weeks ago the RC5 was released with some big changes in there, like modules [universal] a full solution for universal rendering, which means that the initial view of the application can be rendered on a server and shipped as fully populated HTML. Lazy loading - It comes with a router that supports lazily loading the code for routes only when they're first accessed – Lacked in NG1 Native App Support –you can build a cross-platform iOS and Android app with Angular2 and NativeScript and you can build desktop applications using Ng2 and Electron Web Workers - you can configure Angular 2 so that most of your application code runs in a Web Worker
  5. Before showing any Angular2 code I’d like to quickly review a TypeScript.
  6. The language we usually call "JavaScript" is formally known as "EcmaScript". ES5 - The 5th edition of ECMAScript, standardized in 2009. This standard has been implemented in all modern browsers ES6 - The 6th edition of ECMAScript, standardized in 2015. This standard has been partially implemented in most modern browsers. It has a lot of cool features, like classes, arrow functions, template strings, module s Does any of you guys use ES6 in your real projects? ES7 – there’s a proposal of es2016 And the TypeScript – which is not a new language but just a superset of JavaScript, that supports all latest features of ES and adds opional typings [FOR EXAMPLE – VS CODE]
  7. Here are different types in TS, let’s take a look at some of them: s, n, b, A, or it can be ‘any’ if you are not sure or you can create your own type - Interface Interfaces are abstract descriptions of things, and can be used to represent any non-primitive JavaScript object. They produce no code (ES6 or ES5), and exist only to describe types to tsc. Here’s an example: And that’s pretty much it
  8. Now, Let’s see what do we have in ng2. Let’s dive into the ecosystem
  9. NG2 is all about components. The whole application can be modelled as a tree of these components. This is how it looks like [CODE] Every Angular app has at least one root component. Components are the basic building blocks of Angular applications. A component controls a portion of the screen, it’s has it’s own template, styles. @Component is a decorator that allows us to associate metadata with the component class. The metadata tells Angular how to create and use this component. TEMPLATES You can write templates inline here or move it to a separate file, let’s do that
  10. Let’s see how we can style any component There are several ways to add styling to your components 1. we can write inline 2. Style URLs in Metadata One more important thing about Component styles: the selectors we put into a component's styles only apply within the template of that component. Component CSS styles are encapsulated into the component's own view and do not affect the rest of the application.
  11. A Component has a lifecycle managed by Angular itself. Angular creates it, renders it, creates and renders its children, checks it when its data-bound properties change, and destroys it before removing it from the DOM. And here’s how it can be implemented [CODE]
  12. every Component should be part of a module, and every app requires at least one module This feature was introduced in the latest RC about 2 weeks ago Many Angular libraries and third party libraries are modules as well. Similar to what we have in ng1, we find new module, download and include it and directives are available throughout an application. As the app grows, we refactor the root module into feature modules that represent collections of related functionality. We then import these modules into the root module.
  13. Now let’s see how we can actually run the application We need to import the main module of application and a function to bootstrap it. It’s because Bootstrapping is platform-specific, you may load a module in a different environment, it may be the Cordova or NativeScript for mobile applications or We might wish to render the first page of our application on the server to improve launch performance or facilitate SEO And It’s better to have a separate file for this process at least for separation of concerns.
  14. Next important feature is a Service As you have an Angular 1 background then you are familiar with this concept, but in NG2 it’s much simplier : there’s no more service/factory. In Angular 2 there are only services, and they are just vanilla ES6 classes. And to make that service injectable into other services and components we need to decorate the class with Injectable function [CODE]
  15. And the way to use Services: firs of all you have to register it, you can now register services in the module level to be used throughout a whole module. Or you can register your service in the Component level and it’ll be available to that component and its children. Here’s the usage
  16. There’re much more stuff to check but I’d like to get back to Components and take a quick look at the way of building applications from Architectural perspective.
  17. So let’s take a look how to build applications using Component Architecture.
  18. If you ever started learning ReactJS then you’ve probably seen this article – “Thinking in React”. But the Step One can be applied not only to React, it’s actually a short explanation of the “Component Architecture”, which says that your application should be a tree of small components.
  19. Let’s say we are creating a simple application that has a list of users, search and info about a selected user [1]. Now we need to split all features into separate components, like this [2] But during development you will notice that <userEdit> is not enough for such a big component so better to create few more components, like this [3] Those components have blue background because they are so-called presentational components (stateless, dumb). They don’t know how to read or write data. They receive data via property binding and they output data via events. While those white components are Containers (or stateful or smart) components. They can communicate with services and render child components. It’s useful
  20. And The data flow. Angular 2 change detection enforces a uni-directional data flow. It runs and updates the view when the data on our classes gets updated.
  21. By default, Angular 1 implemented two-way data binding, the flow of changes is pretty much chaotic, anything could change anything else. In NG2 the flow of information is unidirectional. As I said, component receive data via property binding and they output data via events.
  22. And there’s one more tool worth mentioning here – Angular CLI
  23. f you don’t want to spend much time configuring your building and testing processes then you should definitely consider it I wanted to show it to you in action but it doesn’t support RC5, so no modules, bootstrapping Let’s see it in action
  24. In Angular, a Component is a special kind of directive that uses a simpler configuration which is suitable for a component-based application structure. This makes it easier to use Angular 2's style of application architecture.
  25. $onInit() - after all the controllers on an element have been constructed and had their bindings initialized $onChanges(changesObj) - Called whenever one-way bindings are updated. $doCheck() - Called on each turn of the digest cycle. $onDestroy() - Called on a controller when its containing scope is destroyed. $postLink() - Called after this controller's element and its children have been linked. ngAfterViewInit, content