SlideShare a Scribd company logo
1 of 62
Download to read offline
El viaje de Angular1 a Angular2
Antonio de la Torre
#DevFestAsturias 03/11/2016
@adelatorrefoss
Angular
“AngularJS is a structural
framework for dynamic web apps.
It lets you use HTML as your
template language and lets you
extend HTML's syntax to express
your application's components
clearly and succinctly. Angular's
data binding and dependency
injection eliminate much of the code
you would otherwise have to write.
Angular teaches the browser new
syntax through a construct we call
directives.“
https://docs.angularjs.org/guide/introduction
Oyendo hablar de
Angular2 desde el
verano pasado
(2015)
y que Angular 1
está muerto.
Antonio de la Torre
Software Developer
Me mudé en Julio
tras 12 años en Madrid
#Movember
mobro.co/tonodelatorre
¿Qué aporta
Angular?
● Completo.
● Te ahorra la fontanería.
● Bien documentado.
● Mucha comunidad.
● Patrón reconocido MVC.
● ES6.
● Opinionado
(pero si no te gusta tengo otra)
Mundo viejuno
aka Angular < 1.5
Ejemplo de código:
https://angularjs.org/#create-components
from
angular.module('directives')
.directive('pony', function(){
return {
scope: {
name: '='
},
controllerAs: 'vm',
controller: function($scope){
var vm = this;
vm.name = $scope.name;
// we have to add a watcher on $scope.name to make this work
$scope.$watch('name', function(newName){
vm.name = newName;
});
},
template: '<p>{{vm.name}}</p>'
}
});
to
angular.module('directives')
.directive('pony', function(){
return {
bindToController: {
name: '='
},
controllerAs: 'vm',
scope: true,
controller: function(){},
template: '<p>{{vm.name}}</p>'
}
});
Componentes
React es lo que
está de moda
Los COMPONENTES están de moda
ReduxFlux
https://facebook.github.io/flux/docs/overview.html#structure-and-data-flow
Flux
https://egghead.io/series/getting-started-with-redux
Redux
Three Principles of Redux
Single source of truth
The state of your whole application is stored in an object tree within a single store.
State is read-only
The only way to change the state is to emit an action, an object describing what
happened.
Changes are made with pure functions
To specify how the state tree is transformed by actions, you write pure reducers.http://redux.js.org/docs/introduction/ThreePrinciples.html
https://css-tricks.com/learning-react-redux/
https://css-tricks.com/learning-react-redux/
Javascript Fatigue
“The Javascript pendulum has swung from
restrictive, monolithic frameworks to
modular, boilerplate-hindered libraries.”
EricClemmons
https://medium.com/@ericclemmons/javascript-fatigue-48d4011b6fc4#.nzcp66xkh
Javascript Fatigue Fatigue
Don’t try to know everything – it’s impossible in
modern web development.
I find it important to remain human. Don’t overdo
discipline, don’t become a life improvement
machine. Periods of boredom and doing nothing are
important for recuperating and inspiration.
AxelRauschmayer
http://www.2ality.com/2016/02/js-fatigue-fatigue.html
Guías de estilo
vienen en nuestra ayuda
Guías de estilo de
John Papa y Todd Motto
para Angular 1.4 mejoró la situación
https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md
https://github.com/toddmotto/angular-styleguide
Y Angular crea
.component()
Aparece Angular 1.5 (febrero 2016)
última release 1.x => 2.0
Angular 1 Changelog
1.3.0 superluminal-nudge (2014-10-13)
1.4.0 jaracimrman-existence (2015-05-26)
1.3.20 shallow-translucence (2015-09-29)
1.5.0 ennoblement-facilitation (2016-02-05)
1.2.30 patronal-resurrection (2016-07-21) only version branch that supports IE8
1.5.8 arbitrary-fallbacks (2016-07-22)
1.4.13 croaking-elderweed (2016-10-10)
1.6.0-rc.0 bracing-vortex (2016-10-26)https://github.com/angular/angular.js/blob/master/CHANGELOG.md
Angular 2 Changelog
2.0.0-alpha.27 (2015-06-17)
2.0.0-alpha.55 (2015-12-15)
2.0.0-beta.17 (2016-04-28)
2.0.0-rc.0 (2016-05-02)
2.0.0-rc.7 (2016-09-13)
2.0.0 proprioception-reinforcement
(2016-09-14)
https://github.com/angular/angular/blob/master/CHANGELOG.md
2.1.0 incremental-metamorphosis
(2016-10-12)
2.2.0-beta.1 (2016-10-27)
2.1.2 (2016-10-27)
La arquitectura de
componentes en Angular 1.5
La arquitectura de componentes
● Solo controlan su propia vista y datos
● Tienen una API bien definida
● Una aplicación es un árbol de componentes
● Eliminó la magia negra de las directivas
● No hace falta conocer el ciclo de compilación a fondo
● No es necesario acceder al $scope
ES6
Clases
Módulos
Arrow function
Array (y nuevos tipos)
...
Migrating from 1.4 to 1.5
https://docs.angularjs.org/guide/migration
Angular 1.5 takes a big step towards preparing developers for a smoother transition to
Angular 2 in the future. Architecting your applications using components, multi-slot
transclusion, one-way bindings in isolate scopes, using lifecycle hooks in directive
controllers and relying on native ES6 features (such as classes and arrow functions) are
now all possible with Angular 1.5.
Ejemplo de código:
https://docs.angularjs.org/guide/component
Guía de estilo Angular 1.5 de Todd Motto
Scope
- Stateful components
- Stateless components
Directives
- Directives should be used solely for decorating the DOM.
Eventos
- Comunicación con el padre por eventos. $event
Pasar datos de componentes hacia arriba:
About events
https://toddmotto.com/angular-1-5-lifecycle-hooks
Okay, bear with me, we’re in the final phase. This is where things get… interesting.
Instead of just passig back this.user into the function, we’re going to fake an $event
Object, which complies with how Angular 2 does this (using EventEmitter), and also
provides global consistency between your templates to fetch data back through the
El lío del router
● ngRoute para v1.4
● ngComponentRouter para v1.5
● RouterModule para v2
● ui-router (estándar de facto en todas)
Angular 2
Ventajas
● Componentes
● Independiente de la plataforma
● Web workers
● Server side rendering
● Typescript
● Rx
http://slides.com/gruizdevilla/angular-2-workshop#/
https://www.youtube.com/watch?v=7vSPfmHWIjA
tipos
anotaciones
RxJS
eventos
Event Sourcing
Martin Fowler (2005)
Ventajas
● ES6 (Módulos y clases)
● No ng-class, no ng-click, all are DOM native
attributes.
An Angular 2 Force Awakens - John Papa
Ng Conf 2016 4 May
some code...
<html>
<head>
<title>Angular 2</title> </head>
<!-- ... -->
<body>
<my-app>Loading...</my-app>
</body>
</html>
https://angular.io/docs/ts/latest/tutorial/toh-pt1.html
some code...
import { Component } from '@angular/core';
export class Hero {
id: number;
name: string;
}
@Component({
selector: 'my-app',
template: `
<h1>{{title}}</h1>
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div>
<label>name: </label>
<input [(ngModel)]="hero.name"
placeholder="name">
</div>
`})
export class AppComponent {
title = 'Tour of Heroes';
hero: Hero = {
id: 1,
name: 'Windstorm'
};
}
some code...
import { Component } from '@angular/core';
export class Hero {
id: number;
name: string;
}
const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice' },...];
@Component({
selector: 'my-app',
template: `
<h1>{{title}}</h1>
<h2>My Heroes</h2>
<ul class="heroes">
<li *ngFor="let hero of heroes"
[class.selected]="hero === selectedHero"
(click)="onSelect(hero)">
<span class="badge">{{hero.id}}</span>
{{hero.name}}
</li>
</ul>
<div *ngIf="selectedHero">
<h2>{{selectedHero.name}} details!</h2>
<div><label>id: </label>{{selectedHero.id}}</div>
<div>
<label>name: </label>
<input [(ngModel)]="selectedHero.name"
placeholder="name"/>
</div>
</div>
`,
styles: [`...`]
})
export class AppComponent {
title = 'Tour of Heroes';
heroes = HEROES;
selectedHero: Hero;
onSelect(hero: Hero): void {
this.selectedHero = hero;
}
}
Guías de estilo (otra vez)
Angular 2 Style Guide by John Papa
The Angular 2 Style Guide
https://github.com/johnpapa/angular-styleguide/blob/master/a2/README.md
“The Angular 2 Style Guide has been moved
to the Official Angular 2 docs.”
Angular 2 migration guide by Todd Motto
“Convert your Angular 1 knowledge into Angular 2.
Select a topic and start learning!”
http://ngmigrate.telerik.com/
Formación!
Cursos
Egghead
https://egghead.io/technologies/angular2
John Papa
https://www.pluralsight.com/blog/software-development/john-papa-angular2
John's newest Pluralsight course: Angular 2: First Look
Conferencias
https://github.com/mikedice/ngconf2016-slides/blob/master/ngconf-slides.md
Publicado el 4 may. 2016
http://angularconnect.com/2016/sessions/
Publicado el 27 sept. 2016
Combo!
Angular + Redux
Managing state with Redux and Angular 1
http://blog.rangle.io/managing-state-redux-angular/
Angular 1.x Redux: Introduction
https://egghead.io/courses/getting-started-with-redux
Build Redux Style Applications with Angular2, RxJS, and ngrx/store
https://egghead.io/courses/building-a-time-machine-with-angular-2-and-rxjs
¿Qué tal el viaje?
¿Tiene sentido?
gracias
@adelatorrefoss

More Related Content

What's hot

Javascript unit tests with angular 1.x
Javascript unit tests with angular 1.xJavascript unit tests with angular 1.x
Javascript unit tests with angular 1.xRon Apelbaum
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core ConceptsFabio Biondi
 
Angular testing
Angular testingAngular testing
Angular testingYu Jin
 
Angular Advanced Routing
Angular Advanced RoutingAngular Advanced Routing
Angular Advanced RoutingLaurent Duveau
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean ArchitectureBadoo
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2Dhyego Fernando
 
Commit University - Exploring Angular 2
Commit University - Exploring Angular 2Commit University - Exploring Angular 2
Commit University - Exploring Angular 2Commit University
 
Angular 2 : learn TypeScript already with Angular 1
Angular 2 : learn TypeScript already with Angular 1Angular 2 : learn TypeScript already with Angular 1
Angular 2 : learn TypeScript already with Angular 1David Amend
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java DevelopersYakov Fain
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training Patrick Schroeder
 
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 developersPaweł Żurowski
 
Angular 2 Crash Course
Angular  2 Crash CourseAngular  2 Crash Course
Angular 2 Crash CourseElisha Kramer
 
An Intro to Angular 2
An Intro to Angular 2An Intro to Angular 2
An Intro to Angular 2Ron Heft
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Devang Garach
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2Knoldus Inc.
 
Express: A Jump-Start
Express: A Jump-StartExpress: A Jump-Start
Express: A Jump-StartNaveen Pete
 
Exploring Angular 2 - Episode 2
Exploring Angular 2 - Episode 2Exploring Angular 2 - Episode 2
Exploring Angular 2 - Episode 2Ahmed Moawad
 

What's hot (20)

Javascript unit tests with angular 1.x
Javascript unit tests with angular 1.xJavascript unit tests with angular 1.x
Javascript unit tests with angular 1.x
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core Concepts
 
Angular testing
Angular testingAngular testing
Angular testing
 
Angular 2
Angular 2Angular 2
Angular 2
 
Angular Advanced Routing
Angular Advanced RoutingAngular Advanced Routing
Angular Advanced Routing
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2
 
TypeScript and Angular workshop
TypeScript and Angular workshopTypeScript and Angular workshop
TypeScript and Angular workshop
 
Commit University - Exploring Angular 2
Commit University - Exploring Angular 2Commit University - Exploring Angular 2
Commit University - Exploring Angular 2
 
Angular 2 Básico
Angular 2 BásicoAngular 2 Básico
Angular 2 Básico
 
Angular 2 : learn TypeScript already with Angular 1
Angular 2 : learn TypeScript already with Angular 1Angular 2 : learn TypeScript already with Angular 1
Angular 2 : learn TypeScript already with Angular 1
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training
 
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
 
Angular 2 Crash Course
Angular  2 Crash CourseAngular  2 Crash Course
Angular 2 Crash Course
 
An Intro to Angular 2
An Intro to Angular 2An Intro to Angular 2
An Intro to Angular 2
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Express: A Jump-Start
Express: A Jump-StartExpress: A Jump-Start
Express: A Jump-Start
 
Exploring Angular 2 - Episode 2
Exploring Angular 2 - Episode 2Exploring Angular 2 - Episode 2
Exploring Angular 2 - Episode 2
 

Viewers also liked

Desarrollando Juegos Casuales para dispositivos con HTML5 sin morir en el int...
Desarrollando Juegos Casuales para dispositivos con HTML5 sin morir en el int...Desarrollando Juegos Casuales para dispositivos con HTML5 sin morir en el int...
Desarrollando Juegos Casuales para dispositivos con HTML5 sin morir en el int...Marcos Gonzalez
 
Javascript The Good Parts v2
Javascript The Good Parts v2Javascript The Good Parts v2
Javascript The Good Parts v2Federico Galassi
 
Desarrollo de Juegos con HTML5 y JavaScript - Modern Web Event
Desarrollo de Juegos con HTML5 y JavaScript - Modern Web EventDesarrollo de Juegos con HTML5 y JavaScript - Modern Web Event
Desarrollo de Juegos con HTML5 y JavaScript - Modern Web EventMarcos Gonzalez
 
TypeScript: Un lenguaje aburrido para programadores torpes y tristes
TypeScript: Un lenguaje aburrido para programadores torpes y tristesTypeScript: Un lenguaje aburrido para programadores torpes y tristes
TypeScript: Un lenguaje aburrido para programadores torpes y tristesMicael Gallego
 
Javascript: Particularidades del Lenguaje, DOM, Eventos y AJAX
Javascript: Particularidades del Lenguaje, DOM, Eventos y AJAXJavascript: Particularidades del Lenguaje, DOM, Eventos y AJAX
Javascript: Particularidades del Lenguaje, DOM, Eventos y AJAXIrontec
 
Curso de javascript y node avanzado
Curso de javascript y node avanzadoCurso de javascript y node avanzado
Curso de javascript y node avanzadobrainybogota
 
Desarrollo web front-end con TypeScript, Angular 2 e Ionic
Desarrollo web front-end con TypeScript, Angular 2 e IonicDesarrollo web front-end con TypeScript, Angular 2 e Ionic
Desarrollo web front-end con TypeScript, Angular 2 e IonicMicael Gallego
 
Angular 2 Campus Madrid Septiembre 2016
Angular 2 Campus Madrid Septiembre 2016Angular 2 Campus Madrid Septiembre 2016
Angular 2 Campus Madrid Septiembre 2016Micael Gallego
 
TypeScript - Angular 2 - ionic 2
TypeScript - Angular 2 - ionic 2TypeScript - Angular 2 - ionic 2
TypeScript - Angular 2 - ionic 2Micael Gallego
 

Viewers also liked (11)

Desarrollando Juegos Casuales para dispositivos con HTML5 sin morir en el int...
Desarrollando Juegos Casuales para dispositivos con HTML5 sin morir en el int...Desarrollando Juegos Casuales para dispositivos con HTML5 sin morir en el int...
Desarrollando Juegos Casuales para dispositivos con HTML5 sin morir en el int...
 
Javascript The Good Parts v2
Javascript The Good Parts v2Javascript The Good Parts v2
Javascript The Good Parts v2
 
Desarrollo de Juegos con HTML5 y JavaScript - Modern Web Event
Desarrollo de Juegos con HTML5 y JavaScript - Modern Web EventDesarrollo de Juegos con HTML5 y JavaScript - Modern Web Event
Desarrollo de Juegos con HTML5 y JavaScript - Modern Web Event
 
TypeScript: Un lenguaje aburrido para programadores torpes y tristes
TypeScript: Un lenguaje aburrido para programadores torpes y tristesTypeScript: Un lenguaje aburrido para programadores torpes y tristes
TypeScript: Un lenguaje aburrido para programadores torpes y tristes
 
Introducción a Angular
Introducción a AngularIntroducción a Angular
Introducción a Angular
 
Javascript: Particularidades del Lenguaje, DOM, Eventos y AJAX
Javascript: Particularidades del Lenguaje, DOM, Eventos y AJAXJavascript: Particularidades del Lenguaje, DOM, Eventos y AJAX
Javascript: Particularidades del Lenguaje, DOM, Eventos y AJAX
 
Curso de javascript y node avanzado
Curso de javascript y node avanzadoCurso de javascript y node avanzado
Curso de javascript y node avanzado
 
Desarrollo web front-end con TypeScript, Angular 2 e Ionic
Desarrollo web front-end con TypeScript, Angular 2 e IonicDesarrollo web front-end con TypeScript, Angular 2 e Ionic
Desarrollo web front-end con TypeScript, Angular 2 e Ionic
 
Angular 2 Campus Madrid Septiembre 2016
Angular 2 Campus Madrid Septiembre 2016Angular 2 Campus Madrid Septiembre 2016
Angular 2 Campus Madrid Septiembre 2016
 
TypeScript - Angular 2 - ionic 2
TypeScript - Angular 2 - ionic 2TypeScript - Angular 2 - ionic 2
TypeScript - Angular 2 - ionic 2
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Similar to El viaje de Angular1 a Angular2

Angular 2 - How we got here?
Angular 2 - How we got here?Angular 2 - How we got here?
Angular 2 - How we got here?Marios Fakiolas
 
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 #5Johannes Weber
 
Angular 1.x reloaded: improve your app now! and get ready for 2.0
Angular 1.x reloaded:  improve your app now! and get ready for 2.0Angular 1.x reloaded:  improve your app now! and get ready for 2.0
Angular 1.x reloaded: improve your app now! and get ready for 2.0Carlo Bonamico
 
Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3Bruce Pentreath
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]Alex Ershov
 
Angular 2 - SSD 2016 London
Angular 2 - SSD 2016 LondonAngular 2 - SSD 2016 London
Angular 2 - SSD 2016 LondonManfred Steyer
 
Brief introduction to Angular 2.0 & 4.0
Brief introduction to Angular 2.0 & 4.0Brief introduction to Angular 2.0 & 4.0
Brief introduction to Angular 2.0 & 4.0Nisheed Jagadish
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2valuebound
 
Myths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really IsMyths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really IsDevFest DC
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2Naveen Pete
 
AngularConf2016 - A leap of faith !?
AngularConf2016 - A leap of faith !?AngularConf2016 - A leap of faith !?
AngularConf2016 - A leap of faith !?Alessandro Giorgetti
 
Der neueste neue Router (Version 3) für Angular 2
Der neueste neue Router (Version 3) für Angular 2Der neueste neue Router (Version 3) für Angular 2
Der neueste neue Router (Version 3) für Angular 2Manfred Steyer
 

Similar to El viaje de Angular1 a Angular2 (20)

Angular
AngularAngular
Angular
 
Angular js 2.0 beta
Angular js 2.0 betaAngular js 2.0 beta
Angular js 2.0 beta
 
Angular 2 - How we got here?
Angular 2 - How we got here?Angular 2 - How we got here?
Angular 2 - How we got here?
 
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
 
Angular 1.x reloaded: improve your app now! and get ready for 2.0
Angular 1.x reloaded:  improve your app now! and get ready for 2.0Angular 1.x reloaded:  improve your app now! and get ready for 2.0
Angular 1.x reloaded: improve your app now! and get ready for 2.0
 
Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
 
5 Key Benefits of Migration
5 Key Benefits of Migration5 Key Benefits of Migration
5 Key Benefits of Migration
 
Angular 2 - SSD 2016 London
Angular 2 - SSD 2016 LondonAngular 2 - SSD 2016 London
Angular 2 - SSD 2016 London
 
Angular 2 - Better or worse
Angular 2 - Better or worseAngular 2 - Better or worse
Angular 2 - Better or worse
 
Angular
AngularAngular
Angular
 
Brief introduction to Angular 2.0 & 4.0
Brief introduction to Angular 2.0 & 4.0Brief introduction to Angular 2.0 & 4.0
Brief introduction to Angular 2.0 & 4.0
 
Angular Js
Angular JsAngular Js
Angular Js
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Myths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really IsMyths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really Is
 
THE FUTURE OF ANGULAR JS
THE FUTURE OF ANGULAR JSTHE FUTURE OF ANGULAR JS
THE FUTURE OF ANGULAR JS
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
AngularConf2016 - A leap of faith !?
AngularConf2016 - A leap of faith !?AngularConf2016 - A leap of faith !?
AngularConf2016 - A leap of faith !?
 
ngconf2015
ngconf2015ngconf2015
ngconf2015
 
Der neueste neue Router (Version 3) für Angular 2
Der neueste neue Router (Version 3) für Angular 2Der neueste neue Router (Version 3) für Angular 2
Der neueste neue Router (Version 3) für Angular 2
 

More from Antonio de la Torre Fernández

20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...Antonio de la Torre Fernández
 
ITSmf Astur18 La agilidad como motor de cambio en las organizaciones
ITSmf Astur18 La agilidad como motor de cambio en las organizacionesITSmf Astur18 La agilidad como motor de cambio en las organizaciones
ITSmf Astur18 La agilidad como motor de cambio en las organizacionesAntonio de la Torre Fernández
 
Taller Agile para emprendedores InnovAstur y Oviedo Emprende
Taller Agile para emprendedores InnovAstur y Oviedo EmprendeTaller Agile para emprendedores InnovAstur y Oviedo Emprende
Taller Agile para emprendedores InnovAstur y Oviedo EmprendeAntonio de la Torre Fernández
 
Discusiones y decisiones: herramientas para la efectividad
Discusiones y decisiones: herramientas para la efectividadDiscusiones y decisiones: herramientas para la efectividad
Discusiones y decisiones: herramientas para la efectividadAntonio de la Torre Fernández
 
CAS2016 Community of Need & Community of Solutions (December 1st 2016)
CAS2016 Community of Need & Community of Solutions (December 1st 2016)CAS2016 Community of Need & Community of Solutions (December 1st 2016)
CAS2016 Community of Need & Community of Solutions (December 1st 2016)Antonio de la Torre Fernández
 
CAS2014 - Integrando UX & Diseño en el Desarrollo Agil - La historia dos años...
CAS2014 - Integrando UX & Diseño en el Desarrollo Agil - La historia dos años...CAS2014 - Integrando UX & Diseño en el Desarrollo Agil - La historia dos años...
CAS2014 - Integrando UX & Diseño en el Desarrollo Agil - La historia dos años...Antonio de la Torre Fernández
 
ALE14 - Involving UX and Design in Agile Development #sketchnoting
ALE14 - Involving UX and Design in Agile Development #sketchnotingALE14 - Involving UX and Design in Agile Development #sketchnoting
ALE14 - Involving UX and Design in Agile Development #sketchnotingAntonio de la Torre Fernández
 
Where i put my business logic - Greach 2014, Madrid, Spain
Where i put my business logic  - Greach 2014, Madrid, SpainWhere i put my business logic  - Greach 2014, Madrid, Spain
Where i put my business logic - Greach 2014, Madrid, SpainAntonio de la Torre Fernández
 
CAS 2012. Agile en equipos mixtos: Diseño y Desarrollo. Amainando tempestades
CAS 2012. Agile en equipos mixtos: Diseño y Desarrollo. Amainando tempestadesCAS 2012. Agile en equipos mixtos: Diseño y Desarrollo. Amainando tempestades
CAS 2012. Agile en equipos mixtos: Diseño y Desarrollo. Amainando tempestadesAntonio de la Torre Fernández
 
Nuevos negocios y empleos basados en el Software y el Conocimiento Libre
Nuevos negocios y empleos basados en el Software y el Conocimiento LibreNuevos negocios y empleos basados en el Software y el Conocimiento Libre
Nuevos negocios y empleos basados en el Software y el Conocimiento LibreAntonio de la Torre Fernández
 

More from Antonio de la Torre Fernández (16)

20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
 
ITSmf Astur18 La agilidad como motor de cambio en las organizaciones
ITSmf Astur18 La agilidad como motor de cambio en las organizacionesITSmf Astur18 La agilidad como motor de cambio en las organizaciones
ITSmf Astur18 La agilidad como motor de cambio en las organizaciones
 
Taller Agile para emprendedores InnovAstur y Oviedo Emprende
Taller Agile para emprendedores InnovAstur y Oviedo EmprendeTaller Agile para emprendedores InnovAstur y Oviedo Emprende
Taller Agile para emprendedores InnovAstur y Oviedo Emprende
 
Discusiones y decisiones: herramientas para la efectividad
Discusiones y decisiones: herramientas para la efectividadDiscusiones y decisiones: herramientas para la efectividad
Discusiones y decisiones: herramientas para la efectividad
 
CAS2016 Community of Need & Community of Solutions (December 1st 2016)
CAS2016 Community of Need & Community of Solutions (December 1st 2016)CAS2016 Community of Need & Community of Solutions (December 1st 2016)
CAS2016 Community of Need & Community of Solutions (December 1st 2016)
 
UX Agilista - UXSpain 2015
UX Agilista - UXSpain 2015UX Agilista - UXSpain 2015
UX Agilista - UXSpain 2015
 
CAS2014 - Integrando UX & Diseño en el Desarrollo Agil - La historia dos años...
CAS2014 - Integrando UX & Diseño en el Desarrollo Agil - La historia dos años...CAS2014 - Integrando UX & Diseño en el Desarrollo Agil - La historia dos años...
CAS2014 - Integrando UX & Diseño en el Desarrollo Agil - La historia dos años...
 
¿Se puede implementar una Cultura Ágil?
¿Se puede implementar una Cultura Ágil?¿Se puede implementar una Cultura Ágil?
¿Se puede implementar una Cultura Ágil?
 
ALE - Why it's worth going?
ALE - Why it's worth going?ALE - Why it's worth going?
ALE - Why it's worth going?
 
ALE14 - Involving UX and Design in Agile Development #sketchnoting
ALE14 - Involving UX and Design in Agile Development #sketchnotingALE14 - Involving UX and Design in Agile Development #sketchnoting
ALE14 - Involving UX and Design in Agile Development #sketchnoting
 
Where i put my business logic - Greach 2014, Madrid, Spain
Where i put my business logic  - Greach 2014, Madrid, SpainWhere i put my business logic  - Greach 2014, Madrid, Spain
Where i put my business logic - Greach 2014, Madrid, Spain
 
A User Story - some ideas
A User Story - some ideasA User Story - some ideas
A User Story - some ideas
 
Mejoras CAS 2011
Mejoras CAS 2011Mejoras CAS 2011
Mejoras CAS 2011
 
CAS 2012. Agile en equipos mixtos: Diseño y Desarrollo. Amainando tempestades
CAS 2012. Agile en equipos mixtos: Diseño y Desarrollo. Amainando tempestadesCAS 2012. Agile en equipos mixtos: Diseño y Desarrollo. Amainando tempestades
CAS 2012. Agile en equipos mixtos: Diseño y Desarrollo. Amainando tempestades
 
Arquitectura en Alfresco
Arquitectura en AlfrescoArquitectura en Alfresco
Arquitectura en Alfresco
 
Nuevos negocios y empleos basados en el Software y el Conocimiento Libre
Nuevos negocios y empleos basados en el Software y el Conocimiento LibreNuevos negocios y empleos basados en el Software y el Conocimiento Libre
Nuevos negocios y empleos basados en el Software y el Conocimiento Libre
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

El viaje de Angular1 a Angular2

  • 1. El viaje de Angular1 a Angular2 Antonio de la Torre #DevFestAsturias 03/11/2016 @adelatorrefoss
  • 2. Angular “AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Angular's data binding and dependency injection eliminate much of the code you would otherwise have to write. Angular teaches the browser new syntax through a construct we call directives.“ https://docs.angularjs.org/guide/introduction
  • 3. Oyendo hablar de Angular2 desde el verano pasado (2015) y que Angular 1 está muerto.
  • 4. Antonio de la Torre Software Developer
  • 5. Me mudé en Julio tras 12 años en Madrid
  • 7. ¿Qué aporta Angular? ● Completo. ● Te ahorra la fontanería. ● Bien documentado. ● Mucha comunidad. ● Patrón reconocido MVC. ● ES6. ● Opinionado (pero si no te gusta tengo otra)
  • 9.
  • 10.
  • 11.
  • 13. from angular.module('directives') .directive('pony', function(){ return { scope: { name: '=' }, controllerAs: 'vm', controller: function($scope){ var vm = this; vm.name = $scope.name; // we have to add a watcher on $scope.name to make this work $scope.$watch('name', function(newName){ vm.name = newName; }); }, template: '<p>{{vm.name}}</p>' } });
  • 14. to angular.module('directives') .directive('pony', function(){ return { bindToController: { name: '=' }, controllerAs: 'vm', scope: true, controller: function(){}, template: '<p>{{vm.name}}</p>' } });
  • 16. React es lo que está de moda
  • 18.
  • 22. Three Principles of Redux Single source of truth The state of your whole application is stored in an object tree within a single store. State is read-only The only way to change the state is to emit an action, an object describing what happened. Changes are made with pure functions To specify how the state tree is transformed by actions, you write pure reducers.http://redux.js.org/docs/introduction/ThreePrinciples.html
  • 26. “The Javascript pendulum has swung from restrictive, monolithic frameworks to modular, boilerplate-hindered libraries.” EricClemmons https://medium.com/@ericclemmons/javascript-fatigue-48d4011b6fc4#.nzcp66xkh
  • 28. Don’t try to know everything – it’s impossible in modern web development. I find it important to remain human. Don’t overdo discipline, don’t become a life improvement machine. Periods of boredom and doing nothing are important for recuperating and inspiration. AxelRauschmayer http://www.2ality.com/2016/02/js-fatigue-fatigue.html
  • 29. Guías de estilo vienen en nuestra ayuda
  • 30. Guías de estilo de John Papa y Todd Motto para Angular 1.4 mejoró la situación https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md https://github.com/toddmotto/angular-styleguide
  • 31.
  • 33. Aparece Angular 1.5 (febrero 2016) última release 1.x => 2.0
  • 34. Angular 1 Changelog 1.3.0 superluminal-nudge (2014-10-13) 1.4.0 jaracimrman-existence (2015-05-26) 1.3.20 shallow-translucence (2015-09-29) 1.5.0 ennoblement-facilitation (2016-02-05) 1.2.30 patronal-resurrection (2016-07-21) only version branch that supports IE8 1.5.8 arbitrary-fallbacks (2016-07-22) 1.4.13 croaking-elderweed (2016-10-10) 1.6.0-rc.0 bracing-vortex (2016-10-26)https://github.com/angular/angular.js/blob/master/CHANGELOG.md
  • 35. Angular 2 Changelog 2.0.0-alpha.27 (2015-06-17) 2.0.0-alpha.55 (2015-12-15) 2.0.0-beta.17 (2016-04-28) 2.0.0-rc.0 (2016-05-02) 2.0.0-rc.7 (2016-09-13) 2.0.0 proprioception-reinforcement (2016-09-14) https://github.com/angular/angular/blob/master/CHANGELOG.md 2.1.0 incremental-metamorphosis (2016-10-12) 2.2.0-beta.1 (2016-10-27) 2.1.2 (2016-10-27)
  • 37. La arquitectura de componentes ● Solo controlan su propia vista y datos ● Tienen una API bien definida ● Una aplicación es un árbol de componentes ● Eliminó la magia negra de las directivas ● No hace falta conocer el ciclo de compilación a fondo ● No es necesario acceder al $scope
  • 39. Migrating from 1.4 to 1.5 https://docs.angularjs.org/guide/migration Angular 1.5 takes a big step towards preparing developers for a smoother transition to Angular 2 in the future. Architecting your applications using components, multi-slot transclusion, one-way bindings in isolate scopes, using lifecycle hooks in directive controllers and relying on native ES6 features (such as classes and arrow functions) are now all possible with Angular 1.5.
  • 41. Guía de estilo Angular 1.5 de Todd Motto Scope - Stateful components - Stateless components Directives - Directives should be used solely for decorating the DOM. Eventos - Comunicación con el padre por eventos. $event
  • 42. Pasar datos de componentes hacia arriba: About events https://toddmotto.com/angular-1-5-lifecycle-hooks Okay, bear with me, we’re in the final phase. This is where things get… interesting. Instead of just passig back this.user into the function, we’re going to fake an $event Object, which complies with how Angular 2 does this (using EventEmitter), and also provides global consistency between your templates to fetch data back through the
  • 43.
  • 44. El lío del router ● ngRoute para v1.4 ● ngComponentRouter para v1.5 ● RouterModule para v2 ● ui-router (estándar de facto en todas)
  • 46. Ventajas ● Componentes ● Independiente de la plataforma ● Web workers ● Server side rendering ● Typescript ● Rx http://slides.com/gruizdevilla/angular-2-workshop#/ https://www.youtube.com/watch?v=7vSPfmHWIjA
  • 49. Ventajas ● ES6 (Módulos y clases) ● No ng-class, no ng-click, all are DOM native attributes. An Angular 2 Force Awakens - John Papa Ng Conf 2016 4 May
  • 50. some code... <html> <head> <title>Angular 2</title> </head> <!-- ... --> <body> <my-app>Loading...</my-app> </body> </html> https://angular.io/docs/ts/latest/tutorial/toh-pt1.html
  • 51. some code... import { Component } from '@angular/core'; export class Hero { id: number; name: string; } @Component({ selector: 'my-app', template: ` <h1>{{title}}</h1> <h2>{{hero.name}} details!</h2> <div><label>id: </label>{{hero.id}}</div> <div> <label>name: </label> <input [(ngModel)]="hero.name" placeholder="name"> </div> `}) export class AppComponent { title = 'Tour of Heroes'; hero: Hero = { id: 1, name: 'Windstorm' }; }
  • 52. some code... import { Component } from '@angular/core'; export class Hero { id: number; name: string; } const HEROES: Hero[] = [ { id: 11, name: 'Mr. Nice' },...]; @Component({ selector: 'my-app', template: ` <h1>{{title}}</h1> <h2>My Heroes</h2> <ul class="heroes"> <li *ngFor="let hero of heroes" [class.selected]="hero === selectedHero" (click)="onSelect(hero)"> <span class="badge">{{hero.id}}</span> {{hero.name}} </li> </ul> <div *ngIf="selectedHero"> <h2>{{selectedHero.name}} details!</h2> <div><label>id: </label>{{selectedHero.id}}</div> <div> <label>name: </label> <input [(ngModel)]="selectedHero.name" placeholder="name"/> </div> </div> `, styles: [`...`] }) export class AppComponent { title = 'Tour of Heroes'; heroes = HEROES; selectedHero: Hero; onSelect(hero: Hero): void { this.selectedHero = hero; } }
  • 53.
  • 54. Guías de estilo (otra vez)
  • 55. Angular 2 Style Guide by John Papa The Angular 2 Style Guide https://github.com/johnpapa/angular-styleguide/blob/master/a2/README.md “The Angular 2 Style Guide has been moved to the Official Angular 2 docs.”
  • 56. Angular 2 migration guide by Todd Motto “Convert your Angular 1 knowledge into Angular 2. Select a topic and start learning!” http://ngmigrate.telerik.com/
  • 59. Conferencias https://github.com/mikedice/ngconf2016-slides/blob/master/ngconf-slides.md Publicado el 4 may. 2016 http://angularconnect.com/2016/sessions/ Publicado el 27 sept. 2016
  • 61. Angular + Redux Managing state with Redux and Angular 1 http://blog.rangle.io/managing-state-redux-angular/ Angular 1.x Redux: Introduction https://egghead.io/courses/getting-started-with-redux Build Redux Style Applications with Angular2, RxJS, and ngrx/store https://egghead.io/courses/building-a-time-machine-with-angular-2-and-rxjs
  • 62. ¿Qué tal el viaje? ¿Tiene sentido? gracias @adelatorrefoss