SlideShare a Scribd company logo
 
Nagaraju Sangam
AngularBuff@ ADP
nagaraju_sangam@yahoo.co.i
n
Speakerat various FrontEnd Meetups
nagaraju.sangam@gmail.com
 Errors?? God Only Knows 
 Errors are ignored in templates. Even God Doesn’t know..!!! 
 Different ways to create different things: provider, factoy, service, value, constant
 Opinionated, Verbose, steep learning curve
 Everything is singleton 
 Not an elegant dependency injection, crazy work arounds for minification 
 Route: No built-in partial view support using ng-route
 Issues with Scope & child scopes
 Dirty checking
 Issues with digest cycles: $scope.apply();
 Two way data binding: Max of 2000 bindings.
 jqLite: No direct modification of dom??? dropped in 2.0 
 Directives supports “EACM” only no way to use selectors.
 modules : No built-in module loading
 No inheritance supported for angular modules
 To knock off many old components.
i.e. $scope, $rootScope, services, controllers, modules, jqLite etc.
 To leverage latest ECMA Script standards
 To leverage modern browser capabilities.
 Improve many areas with different approaches with past expirience.
Routing
Services
DI
Directives
ES5 & ES6+
Server Side
Angular
Change Detection
Web workers
Promises
Testing
Material design
RxJsTypes
Annotations
Angular JS 1.x Angular JS 2.0
Controllervs
$scopeecives
Component Class
Service Simple Class
Angular Modules ES6 Modules
Directive
 Converts source code from one programming language to other.
 ES6 to ES5 Transpilers
 Traceur
 Typescript
 Flow
 Babel
 Dart
 Angular2 apps should be written in ES6. since the browsers doesn’t support ES6 you can use any of the above
transpiler to convert it to ES5.
 Google and Microsoft are working together to make type script as a standard for developing angular2.0 apps.
http://www.2ality.com/2014/10/typed-javascript.html
ES
6
ES
5
Type
s
Annotatio
ns
AtScript
Type script
Angular 1.X Angular 2.0
 Change detection happens at DOM node level
only
 Change in one node triggers dirty checking at all
other nodes.
 Change detection can happen at component level as
well.
 Change in one component triggers dirty checking in
other nodes below the current node…
 Change detection strategy can be configured at
component level
@Component({
selector: <string>‘,
changeDetection: ‘<string>’
})
@View({
template: ‘<string>’
})
export class <className>{
constructor() {
}
}
 The changeDetection property defines, whether the change detection will be
checked every time or only when the component tells it to do so.
Watchtower.js is used for change detection.
 Angular 2.0 doesn’t have two-way data binding like 1.x
 two-way data binding can be achieved with the combination of event & property bindings:
<input type='text' [value]=‘ename' (keyup)=‘ename=$event.target.value' />
 In short :
<input type='text' [value]=‘ename' (keyup)=‘ename=$event.target.value' />
 Routing happens at component level, for each different route different component can be loaded into RouterOutlet
directive, it is similar to ui-view in angular 1.X.
@RouteConfig([
{ path: '/', redirectTo: '/sponsers' },
{ path: '/sponsers', component: Sponsers, as: 'sponsers'}, //sponsers & attendees are components
{ path: '/attendees', component: Attendees, as: 'attendees'}
])
<router-outlet></router-outlet>
 Router-Link is similar to hg-href in 1.X.
<a [router-link]="['/attendees']" router-params="">attendees</a>
 JSON based route config
 404 support
 QueryString support
 Lyfecycle events
 routeResolver
 Component Directives
 Decorative Directives
 Template Directives
Following annotations are used to create directives.
 @Directive
 @Component
http://www.2ality.com/2014/10/typed-javascript.html
Service is a simple ES6 class in Angular2, these services should be injected into components via
Dependency Injection.
Sponsers-Service.ts
export class SponsersService{
constructor() {
}
getData(){
return ['cisco','intel','flipkart'];
}
}
http://www.2ality.com/2014/10/typed-javascript.html
http://www.2ality.com/2014/10/typed-javascript.html
Http is available as a separate module in alpha 35: https://code.angularjs.org/2.0.0-alpha.35
Eg:
import {Http, httpInjectables} from 'angular2/http';
@Component({selector: 'http-app', viewBindings: [httpInjectables]})
@View({templateUrl: 'people.html'})
class PeopleComponent {
constructor(http: Http) {
http.get('people.json')
.toRx()
.map(res => res.json())
.subscribe(people => this.people = people);
}
}
 Dependencies can be specifies as parameters: eg: function(@Inject(<svcName>) s)
 Component dependencies should be listed in bindings property of @Component annotation.
 Template dependencies should be listed in directives property of @View annotation.
http://www.2ality.com/2014/10/typed-javascript.html
import {Component, View, Injector} from 'angular2/angular2';
import { NgFor } from 'angular2/angular2';
import {SponsersService} from 'services/sponsers-service';
@Component({
selector: 'sponsers',
bindings:[SponsersService]
})
@View({
template: '<ul><li *ng-for="#item of data">{{item}}</li></ul>',
directives:[NgFor]
})
export class Sponsers {
data;
constructor(@Inject(SponsersService) s) {
this.data = s.getData();
}
}
Main-thread
(Browser+App+Angular Dom renderer)
messages
Child thread
(Angular stuff – house keeping etc)
 http://angular.io
 www.victorsavkin.com
 www.tryangular2.com
 http://www.syntaxsuccess.com/viewarticle/routing-in-angular-2.0
 http://blog.thoughtram.io/angular/2015/06/16/routing-in-angular-2.html
https://github.com/nasangam
Angular js 2.0 beta

More Related Content

What's hot (20)

PDF
Angular 2... so can I use it now??
Laurent Duveau
 
PDF
Angular 2: What's New?
jbandi
 
PDF
Introduction to Angular 2
Dawid Myslak
 
PDF
Getting Started with Angular 2
FITC
 
PDF
Angular 2 Crash Course
Elisha Kramer
 
PDF
Introduction to Angular 2
Naveen Pete
 
PDF
Angular 2 overview
Jesse Warden
 
PPTX
Angular 1.x in action now
GDG Odessa
 
PDF
Angular 2 - Core Concepts
Fabio Biondi
 
PDF
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Codemotion
 
PDF
Angular2 with TypeScript
Rohit Bishnoi
 
PPTX
AngularJS 2.0
Boyan Mihaylov
 
PPTX
Angular 2 + TypeScript = true. Let's Play!
Sirar Salih
 
PPTX
What’s new in angular 2
Ran Wahle
 
PDF
Angular 2: core concepts
Codemotion
 
PDF
Angular 2 - An Introduction
NexThoughts Technologies
 
PPTX
Angular 5
Bartłomiej Narożnik
 
PPTX
5 angularjs features
Alexey (Mr_Mig) Migutsky
 
PDF
Building Universal Applications with Angular 2
Minko Gechev
 
PPTX
Angular 2
Nigam Goyal
 
Angular 2... so can I use it now??
Laurent Duveau
 
Angular 2: What's New?
jbandi
 
Introduction to Angular 2
Dawid Myslak
 
Getting Started with Angular 2
FITC
 
Angular 2 Crash Course
Elisha Kramer
 
Introduction to Angular 2
Naveen Pete
 
Angular 2 overview
Jesse Warden
 
Angular 1.x in action now
GDG Odessa
 
Angular 2 - Core Concepts
Fabio Biondi
 
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Codemotion
 
Angular2 with TypeScript
Rohit Bishnoi
 
AngularJS 2.0
Boyan Mihaylov
 
Angular 2 + TypeScript = true. Let's Play!
Sirar Salih
 
What’s new in angular 2
Ran Wahle
 
Angular 2: core concepts
Codemotion
 
Angular 2 - An Introduction
NexThoughts Technologies
 
5 angularjs features
Alexey (Mr_Mig) Migutsky
 
Building Universal Applications with Angular 2
Minko Gechev
 
Angular 2
Nigam Goyal
 

Viewers also liked (20)

PPTX
Post modern theory application
joajoajoa1
 
PPT
NEGATIVA VOTE IN ELECTIONS
Kishan Panchal
 
PDF
Persistent System: Focusing on the increase IP-led revenues
NARNOLIA SECURITIES LIMITED
 
PPTX
Vampiros: de Drácula a True Blood
Jorge Martínez Lucena
 
PPTX
Lekts 4
Batdorj Tuvaan
 
PDF
Career services guide_web_may20_2015
Mental Health Commission of Canada
 
PPTX
Lekts 4
Batdorj Tuvaan
 
PDF
CASO CLÍNICO: PACIENTE ALCOÓLATRA COM OBESIDADE
uniaoquimica
 
PPT
My favorite subject
Alvin Panghulan Dolaoco
 
PDF
18 Mobile Marketing Truisms
wefidata
 
PPT
LA MODA DE LOS ZAPATOS
irenegutieerrez
 
PPTX
Digital publishing power point
charlie_murphy5
 
PDF
Схема водоснабжения и водоотведения сп Ермолинское на период до 2023 года (2)
Администрация сельского поселения Ермолинское Истринского района Московской области
 
PDF
Salah satu penyakit yang biasa muncul pada lansia
Ridwan Setiawan
 
PDF
2015-05-19 Atelier N°3 SSA 2015 "MSSanté dans votre messagerie d'établissemen...
ASIP Santé
 
PDF
스프링 프로젝트 시작하기
Ashal aka JOKER
 
ODP
Apprendre du lexique
Stel LOula
 
PPT
Teatro Español en los Siglos de Oro
Juan Suárez Pérez
 
PDF
Pediatric Febrile Seizures اختلاجات دراطفال
Dr.Mujeebullah Mahboob
 
PPT
El ballet
galletasdeoreo
 
Post modern theory application
joajoajoa1
 
NEGATIVA VOTE IN ELECTIONS
Kishan Panchal
 
Persistent System: Focusing on the increase IP-led revenues
NARNOLIA SECURITIES LIMITED
 
Vampiros: de Drácula a True Blood
Jorge Martínez Lucena
 
Career services guide_web_may20_2015
Mental Health Commission of Canada
 
CASO CLÍNICO: PACIENTE ALCOÓLATRA COM OBESIDADE
uniaoquimica
 
My favorite subject
Alvin Panghulan Dolaoco
 
18 Mobile Marketing Truisms
wefidata
 
LA MODA DE LOS ZAPATOS
irenegutieerrez
 
Digital publishing power point
charlie_murphy5
 
Схема водоснабжения и водоотведения сп Ермолинское на период до 2023 года (2)
Администрация сельского поселения Ермолинское Истринского района Московской области
 
Salah satu penyakit yang biasa muncul pada lansia
Ridwan Setiawan
 
2015-05-19 Atelier N°3 SSA 2015 "MSSanté dans votre messagerie d'établissemen...
ASIP Santé
 
스프링 프로젝트 시작하기
Ashal aka JOKER
 
Apprendre du lexique
Stel LOula
 
Teatro Español en los Siglos de Oro
Juan Suárez Pérez
 
Pediatric Febrile Seizures اختلاجات دراطفال
Dr.Mujeebullah Mahboob
 
El ballet
galletasdeoreo
 
Ad

Similar to Angular js 2.0 beta (20)

PPTX
Introduction to Angular js 2.0
Nagaraju Sangam
 
PDF
Angular js
Felixits
 
PDF
Angular js
Felixits
 
PPTX
Angular 2
Travis van der Font
 
PPTX
An afternoon with angular 2
Mike Melusky
 
PPTX
Angular%201%20to%20angular%202
Ran Wahle
 
PPTX
Angular 2 with typescript
Tayseer_Emam
 
PPTX
An evening with Angular 2
Mike Melusky
 
PPTX
What's new in Angular 2?
Alfred Jett Grandeza
 
PDF
Ng-Conf 2015 Report : AngularJS 1 & 2
Nicolas PENNEC
 
PPTX
Intro to AngularJs
SolTech, Inc.
 
PPTX
Quick answers to Angular2+ Interview Questions
Luis Martín Espino Rivera
 
PDF
An Intro to Angular 2
Ron Heft
 
PPTX
PPT on Angular 2 Development Tutorial
Paddy Lock
 
PDF
Angular, the New Angular JS
Kenzan
 
PPTX
AngularJS with TypeScript and Windows Azure Mobile Services
Rainer Stropek
 
PDF
Angular2 tutorial
HarikaReddy115
 
PPTX
Angular TS(typescript)
Ivan Stepić
 
PPTX
Angular js 1.0-fundamentals
Venkatesh Narayanan
 
PPTX
Angular Presentation
Adam Moore
 
Introduction to Angular js 2.0
Nagaraju Sangam
 
Angular js
Felixits
 
Angular js
Felixits
 
An afternoon with angular 2
Mike Melusky
 
Angular%201%20to%20angular%202
Ran Wahle
 
Angular 2 with typescript
Tayseer_Emam
 
An evening with Angular 2
Mike Melusky
 
What's new in Angular 2?
Alfred Jett Grandeza
 
Ng-Conf 2015 Report : AngularJS 1 & 2
Nicolas PENNEC
 
Intro to AngularJs
SolTech, Inc.
 
Quick answers to Angular2+ Interview Questions
Luis Martín Espino Rivera
 
An Intro to Angular 2
Ron Heft
 
PPT on Angular 2 Development Tutorial
Paddy Lock
 
Angular, the New Angular JS
Kenzan
 
AngularJS with TypeScript and Windows Azure Mobile Services
Rainer Stropek
 
Angular2 tutorial
HarikaReddy115
 
Angular TS(typescript)
Ivan Stepić
 
Angular js 1.0-fundamentals
Venkatesh Narayanan
 
Angular Presentation
Adam Moore
 
Ad

Recently uploaded (20)

PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 

Angular js 2.0 beta

  • 3.  Errors?? God Only Knows   Errors are ignored in templates. Even God Doesn’t know..!!!   Different ways to create different things: provider, factoy, service, value, constant  Opinionated, Verbose, steep learning curve  Everything is singleton   Not an elegant dependency injection, crazy work arounds for minification   Route: No built-in partial view support using ng-route  Issues with Scope & child scopes  Dirty checking  Issues with digest cycles: $scope.apply();  Two way data binding: Max of 2000 bindings.  jqLite: No direct modification of dom??? dropped in 2.0   Directives supports “EACM” only no way to use selectors.  modules : No built-in module loading  No inheritance supported for angular modules
  • 4.  To knock off many old components. i.e. $scope, $rootScope, services, controllers, modules, jqLite etc.  To leverage latest ECMA Script standards  To leverage modern browser capabilities.  Improve many areas with different approaches with past expirience.
  • 5. Routing Services DI Directives ES5 & ES6+ Server Side Angular Change Detection Web workers Promises Testing Material design RxJsTypes Annotations
  • 6. Angular JS 1.x Angular JS 2.0 Controllervs $scopeecives Component Class Service Simple Class Angular Modules ES6 Modules Directive
  • 7.  Converts source code from one programming language to other.  ES6 to ES5 Transpilers  Traceur  Typescript  Flow  Babel  Dart  Angular2 apps should be written in ES6. since the browsers doesn’t support ES6 you can use any of the above transpiler to convert it to ES5.  Google and Microsoft are working together to make type script as a standard for developing angular2.0 apps. http://www.2ality.com/2014/10/typed-javascript.html
  • 9. Angular 1.X Angular 2.0  Change detection happens at DOM node level only  Change in one node triggers dirty checking at all other nodes.  Change detection can happen at component level as well.  Change in one component triggers dirty checking in other nodes below the current node…  Change detection strategy can be configured at component level
  • 10. @Component({ selector: <string>‘, changeDetection: ‘<string>’ }) @View({ template: ‘<string>’ }) export class <className>{ constructor() { } }  The changeDetection property defines, whether the change detection will be checked every time or only when the component tells it to do so. Watchtower.js is used for change detection.
  • 11.  Angular 2.0 doesn’t have two-way data binding like 1.x  two-way data binding can be achieved with the combination of event & property bindings: <input type='text' [value]=‘ename' (keyup)=‘ename=$event.target.value' />  In short : <input type='text' [value]=‘ename' (keyup)=‘ename=$event.target.value' />
  • 12.  Routing happens at component level, for each different route different component can be loaded into RouterOutlet directive, it is similar to ui-view in angular 1.X. @RouteConfig([ { path: '/', redirectTo: '/sponsers' }, { path: '/sponsers', component: Sponsers, as: 'sponsers'}, //sponsers & attendees are components { path: '/attendees', component: Attendees, as: 'attendees'} ]) <router-outlet></router-outlet>  Router-Link is similar to hg-href in 1.X. <a [router-link]="['/attendees']" router-params="">attendees</a>  JSON based route config  404 support  QueryString support  Lyfecycle events  routeResolver
  • 13.  Component Directives  Decorative Directives  Template Directives Following annotations are used to create directives.  @Directive  @Component http://www.2ality.com/2014/10/typed-javascript.html
  • 14. Service is a simple ES6 class in Angular2, these services should be injected into components via Dependency Injection. Sponsers-Service.ts export class SponsersService{ constructor() { } getData(){ return ['cisco','intel','flipkart']; } } http://www.2ality.com/2014/10/typed-javascript.html
  • 15. http://www.2ality.com/2014/10/typed-javascript.html Http is available as a separate module in alpha 35: https://code.angularjs.org/2.0.0-alpha.35 Eg: import {Http, httpInjectables} from 'angular2/http'; @Component({selector: 'http-app', viewBindings: [httpInjectables]}) @View({templateUrl: 'people.html'}) class PeopleComponent { constructor(http: Http) { http.get('people.json') .toRx() .map(res => res.json()) .subscribe(people => this.people = people); } }
  • 16.  Dependencies can be specifies as parameters: eg: function(@Inject(<svcName>) s)  Component dependencies should be listed in bindings property of @Component annotation.  Template dependencies should be listed in directives property of @View annotation. http://www.2ality.com/2014/10/typed-javascript.html import {Component, View, Injector} from 'angular2/angular2'; import { NgFor } from 'angular2/angular2'; import {SponsersService} from 'services/sponsers-service'; @Component({ selector: 'sponsers', bindings:[SponsersService] }) @View({ template: '<ul><li *ng-for="#item of data">{{item}}</li></ul>', directives:[NgFor] }) export class Sponsers { data; constructor(@Inject(SponsersService) s) { this.data = s.getData(); } }
  • 17. Main-thread (Browser+App+Angular Dom renderer) messages Child thread (Angular stuff – house keeping etc)
  • 18.  http://angular.io  www.victorsavkin.com  www.tryangular2.com  http://www.syntaxsuccess.com/viewarticle/routing-in-angular-2.0  http://blog.thoughtram.io/angular/2015/06/16/routing-in-angular-2.html